Make WordPress Core


Ignore:
Timestamp:
12/01/2020 07:25:43 PM (4 years ago)
Author:
desrosj
Message:

Twenty Twenty-One: Sync the latest changes for 5.6 RC2.

This will be the final sync from GitHub before placing that repository into read-only mode. All further changes should now flow entirely through Trac.

For a full list of changes since [49633], see https://github.com/WordPress/twentytwentyone/compare/1d5a895...53acd9b.

Props poena, luminuu, kjellr, ryelle, allancole, melchoyce, felipeelia, aljullu, kebbet, chaton666, Clorith, mkaz, ingereck, paaljoachim.
Reviewed by desrosj, SergeyBiryukov.
Merges [49726] to the 5.6 branch.
Fixes #51526.

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  
    1818}
    1919
    20 // Crop Text Boundry
    21 // - Sets a fixed-width on content within alignwide and alignfull blocks
    22 @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 
    4520// Button style
    4621// - Applies button styles to blocks and elements that share them.
    4722@mixin button-style() {
    48     @include crop-text(var(--button--line-height));
     23    line-height: var(--button--line-height);
    4924    color: var(--button--color-text);
    5025    cursor: pointer;
     
    7853    }
    7954}
     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.