WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/07/2019 11:47:26 AM (4 months 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/style-editor.scss

    r45605 r45761  
    626626
    627627    li {
    628         color: $color__text-light;
    629         @include font-family( $font__heading );
    630         font-size: calc(#{$font__size_base} * #{$font__size-ratio});
    631         font-weight: bold;
    632         line-height: $font__line-height-heading;
    633         padding-bottom: ( .75 * $size__spacing-unit );
    634 
    635         &.menu-item-has-children,
    636         &:last-child {
    637             padding-bottom: 0;
    638         }
    639 
    640         a {
     628
     629        > a {
     630            @include font-family( $font__heading );
     631            font-size: calc(#{$font__size_base} * #{$font__size-ratio});
     632            font-weight: bold;
     633            line-height: $font__line-height-heading;
    641634            text-decoration: none;
    642635        }
     
    663656}
    664657
    665 /** === Latest Posts grid view === */
    666 .wp-block-latest-posts.is-grid {
     658/** === Latest Posts === */
     659.wp-block-latest-posts {
     660
     661    .wp-block-latest-posts__post-date {
     662        @include font-family( $font__heading );
     663        font-size: $font__size-xs;
     664        color: $color__text-light;
     665        line-height: 1.2;
     666    }
     667
     668    .wp-block-latest-posts__post-full-content,
     669    .wp-block-latest-posts__post-excerpt {
     670        margin-top: $font__size_base;
     671        margin-bottom: $font__size_base;
     672
     673        > div > p:first-child {
     674            margin-top: $font__size_base;
     675        }
     676    }
     677
     678    li {
     679        padding-bottom: ( .5 * $size__spacing-unit );
     680
     681        &.menu-item-has-children,
     682        &:last-child {
     683            padding-bottom: 0;
     684        }
     685
     686        :not(:last-child) .wp-block-latest-posts__post-excerpt {
     687            padding-bottom: ( .5 * $size__spacing-unit );
     688        }
     689    }
     690
     691    &.is-grid {
    667692        li {
    668693            border-top: 2px solid $color__border;
     
    682707        }
    683708    }
     709}
    684710
    685711/** === Latest Comments === */
Note: See TracChangeset for help on using the changeset viewer.