Make WordPress Core


Ignore:
Timestamp:
08/19/2019 04:45:12 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Twenty Nineteen: Revise Latest Posts block styles to support post content options.

Props kjellr, ianbelanger.
Merges [45761] to the 5.2 branch.
Fixes #47340.

Location:
branches/5.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.2

  • branches/5.2/src/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss

    r45264 r45845  
    229229        list-style: none;
    230230
    231         li {
    232             color: $color__text-light;
     231        li > a {
    233232            @include font-family( $font__heading );
    234233            font-size: calc(#{$font__size_base} * #{$font__size-ratio});
    235234            font-weight: bold;
    236235            line-height: $font__line-height-heading;
    237             padding-bottom: ( .75 * $size__spacing-unit );
     236            text-decoration: none;
     237        }
     238    }
     239
     240    .wp-block-archives,
     241    .wp-block-categories {
     242
     243        &.aligncenter {
     244            text-align: center;
     245        }
     246    }
     247
     248    //! Latest categories
     249    .wp-block-categories {
     250
     251        ul {
     252            padding-top: ( .75 * $size__spacing-unit );
     253        }
     254
     255        li ul {
     256            list-style: none;
     257            padding-left: 0;
     258        }
     259
     260        @include nestedSubMenuPadding();
     261    }
     262
     263    //! Latest posts
     264    .wp-block-latest-posts {
     265
     266        .wp-block-latest-posts__post-date {
     267            @include font-family( $font__heading );
     268            font-size: $font__size-xs;
     269            color: $color__text-light;
     270            line-height: 1.2;
     271        }
     272
     273        .wp-block-latest-posts__post-full-content,
     274        .wp-block-latest-posts__post-excerpt {
     275            margin-top: $size__spacing-unit;
     276            margin-bottom: $size__spacing-unit;
     277        }
     278
     279        li {
     280            padding-bottom: ( .5 * $size__spacing-unit );
    238281
    239282            &.menu-item-has-children,
     
    242285            }
    243286
    244             a {
    245                 text-decoration: none;
    246             }
    247         }
    248     }
    249 
    250     .wp-block-archives,
    251     .wp-block-categories {
    252 
    253         &.aligncenter {
    254             text-align: center;
    255         }
    256     }
    257 
    258     //! Latest categories
    259     .wp-block-categories {
    260 
    261         ul {
    262             padding-top: ( .75 * $size__spacing-unit );
    263         }
    264 
    265         li ul {
    266             list-style: none;
    267             padding-left: 0;
    268         }
    269 
    270         @include nestedSubMenuPadding();
    271     }
    272 
    273     //! Latest posts grid view
    274     .wp-block-latest-posts.is-grid {
    275         li {
     287            :not(:last-child) .wp-block-latest-posts__post-excerpt {
     288                padding-bottom: ( .5 * $size__spacing-unit );
     289            }
     290        }
     291
     292        &.is-grid li {
    276293            border-top: 2px solid $color__border;
    277294            padding-top: (1 * $size__spacing-unit);
Note: See TracChangeset for help on using the changeset viewer.