Changeset 49728 for branches/5.6/src/wp-content/themes/twentytwentyone/assets/sass/02-tools/mixins.scss
- Timestamp:
- 12/01/2020 07:25:43 PM (4 years ago)
- Location:
- branches/5.6
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.6
-
branches/5.6/src/wp-content/themes/twentytwentyone/assets/sass/02-tools/mixins.scss
r49574 r49728 18 18 } 19 19 20 // Crop Text Boundry21 // - Sets a fixed-width on content within alignwide and alignfull blocks22 @mixin crop-text($inset-line-height: 1) {23 24 line-height: $inset-line-height;25 $offset-top: calc(.5em * #{$inset-line-height} + -.38);26 $offset-bottom: calc(.5em * #{$inset-line-height} + -.39);27 28 &:before,29 &:after {30 content: "";31 display: block;32 height: 0;33 width: 0;34 }35 36 &:before {37 margin-bottom: -($offset-top);38 }39 40 &:after {41 margin-top: -($offset-bottom);42 }43 }44 45 20 // Button style 46 21 // - Applies button styles to blocks and elements that share them. 47 22 @mixin button-style() { 48 @include crop-text(var(--button--line-height));23 line-height: var(--button--line-height); 49 24 color: var(--button--color-text); 50 25 cursor: pointer; … … 78 53 } 79 54 } 55 56 @mixin innerblock-margin-clear($container) { 57 58 // Clear the top margin for the first-child. 59 > #{$container} > *:first-child { 60 margin-top: 0; 61 } 62 63 // Last child that is not the appender. 64 > #{$container} > *:last-child:not(.block-list-appender) { 65 margin-bottom: 0; 66 } 67 68 // When selected, the last item becomes the second last because of the appender. 69 &.has-child-selected > #{$container} > *:nth-last-child(2), 70 &.is-selected > #{$container} > *:nth-last-child(2) { 71 margin-bottom: 0; 72 } 73 }
Note: See TracChangeset
for help on using the changeset viewer.