Skip to content

Commit

Permalink
Twenty Nineteen: Revise Latest Posts block styles to support post con…
Browse files Browse the repository at this point in the history
…tent options.

Props kjellr, ianbelanger.
Fixes #47340.

git-svn-id: https://develop.svn.wordpress.org/trunk@45761 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Aug 7, 2019
1 parent 20905d6 commit 008085d
Show file tree
Hide file tree
Showing 5 changed files with 347 additions and 269 deletions.
45 changes: 31 additions & 14 deletions src/wp-content/themes/twentynineteen/sass/blocks/_blocks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -238,22 +238,12 @@
padding: 0;
list-style: none;

li {
color: $color__text-light;
li > a {
@include font-family( $font__heading );
font-size: calc(#{$font__size_base} * #{$font__size-ratio});
font-weight: bold;
line-height: $font__line-height-heading;
padding-bottom: ( .75 * $size__spacing-unit );

&.menu-item-has-children,
&:last-child {
padding-bottom: 0;
}

a {
text-decoration: none;
}
text-decoration: none;
}
}

Expand All @@ -280,9 +270,36 @@
@include nestedSubMenuPadding();
}

//! Latest posts grid view
.wp-block-latest-posts.is-grid {
//! Latest posts
.wp-block-latest-posts {

.wp-block-latest-posts__post-date {
@include font-family( $font__heading );
font-size: $font__size-xs;
color: $color__text-light;
line-height: 1.2;
}

.wp-block-latest-posts__post-full-content,
.wp-block-latest-posts__post-excerpt {
margin-top: $size__spacing-unit;
margin-bottom: $size__spacing-unit;
}

li {
padding-bottom: ( .5 * $size__spacing-unit );

&.menu-item-has-children,
&:last-child {
padding-bottom: 0;
}

:not(:last-child) .wp-block-latest-posts__post-excerpt {
padding-bottom: ( .5 * $size__spacing-unit );
}
}

&.is-grid li {
border-top: 2px solid $color__border;
padding-top: (1 * $size__spacing-unit);
margin-bottom: (2 * $size__spacing-unit);
Expand Down
Loading

0 comments on commit 008085d

Please sign in to comment.