Make WordPress Core


Ignore:
Timestamp:
08/07/2019 11:47:26 AM (5 years ago)
Author:
SergeyBiryukov
Message:

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

Props kjellr, ianbelanger.
Fixes #47340.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss

    r45605 r45761  
    239239        list-style: none;
    240240
    241         li {
    242             color: $color__text-light;
     241        li > a {
    243242            @include font-family( $font__heading );
    244243            font-size: calc(#{$font__size_base} * #{$font__size-ratio});
    245244            font-weight: bold;
    246245            line-height: $font__line-height-heading;
    247             padding-bottom: ( .75 * $size__spacing-unit );
     246            text-decoration: none;
     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
     274    .wp-block-latest-posts {
     275
     276        .wp-block-latest-posts__post-date {
     277            @include font-family( $font__heading );
     278            font-size: $font__size-xs;
     279            color: $color__text-light;
     280            line-height: 1.2;
     281        }
     282
     283        .wp-block-latest-posts__post-full-content,
     284        .wp-block-latest-posts__post-excerpt {
     285            margin-top: $size__spacing-unit;
     286            margin-bottom: $size__spacing-unit;
     287        }
     288
     289        li {
     290            padding-bottom: ( .5 * $size__spacing-unit );
    248291
    249292            &.menu-item-has-children,
     
    252295            }
    253296
    254             a {
    255                 text-decoration: none;
    256             }
    257         }
    258     }
    259 
    260     .wp-block-archives,
    261     .wp-block-categories {
    262 
    263         &.aligncenter {
    264             text-align: center;
    265         }
    266     }
    267 
    268     //! Latest categories
    269     .wp-block-categories {
    270 
    271         ul {
    272             padding-top: ( .75 * $size__spacing-unit );
    273         }
    274 
    275         li ul {
    276             list-style: none;
    277             padding-left: 0;
    278         }
    279 
    280         @include nestedSubMenuPadding();
    281     }
    282 
    283     //! Latest posts grid view
    284     .wp-block-latest-posts.is-grid {
    285         li {
     297            :not(:last-child) .wp-block-latest-posts__post-excerpt {
     298                padding-bottom: ( .5 * $size__spacing-unit );
     299            }
     300        }
     301
     302        &.is-grid li {
    286303            border-top: 2px solid $color__border;
    287304            padding-top: (1 * $size__spacing-unit);
Note: See TracChangeset for help on using the changeset viewer.