Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Make Related Posts styles more consistent between formats #761

Merged
merged 2 commits into from
Mar 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions newspack-katharine/sass/style-editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,3 @@ hr {
}
}
}

// Jetpack Blocks
.jp-relatedposts-i2 {
border-top: 1px dotted $color__text-main;
border-bottom: 1px dotted $color__text-main;
}
6 changes: 0 additions & 6 deletions newspack-katharine/sass/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -353,12 +353,6 @@ figcaption,
hr {
border-top: 1px dotted $color__text-main;
}

// Jetpack Blocks
.jp-relatedposts-i2 {
border-top: 1px dotted $color__text-main;
border-bottom: 1px dotted $color__text-main;
}
}

// Archives
Expand Down
9 changes: 6 additions & 3 deletions newspack-theme/inc/typography.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,10 @@ function newspack_custom_typography_css() {
blockquote cite,

/* Jetpack */
.entry-content #jp-relatedposts h3.jp-relatedposts-headline,
.entry-content #jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post .jp-relatedposts-post-title a

.jp-relatedposts-i2,
#jp-relatedposts.jp-relatedposts,
.jp-relatedposts-i2 .jp-relatedposts-headline,
#jp-relatedposts.jp-relatedposts .jp-relatedposts-headline
{
font-family: $font_header;
}";
Expand Down Expand Up @@ -238,6 +239,8 @@ function newspack_custom_typography_css() {
/* Jetpack blocks */
.block-editor-block-list__layout .block-editor-block-list__block .jp-relatedposts-i2 a,
.block-editor-block-list__layout .block-editor-block-list__block .jp-relatedposts-i2 strong,
.block-editor-block-list__layout .block-editor-block-list__block .jp-relatedposts-i2 .jp-related-posts-i2__post-date,
.block-editor-block-list__layout .block-editor-block-list__block .jp-relatedposts-i2 .jp-related-posts-i2__post-context,

/* Classic Editor */
.block-editor-block-list__layout .block-editor-block-list__block .wp-caption dd,
Expand Down
18 changes: 0 additions & 18 deletions newspack-theme/sass/blocks/_blocks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -826,24 +826,6 @@
}
}

//! Jetpack Blocks
.jp-relatedposts-i2 {
border-top: 1px solid $color__border;
border-bottom: 1px solid $color__border;
padding: $size__spacing-unit 0;
a {
font-family: $font__heading;
font-size: $font__size-base;
font-weight: bold;
text-decoration: none;
}

.jp-related-posts-i2__post-date,
.jp-related-posts-i2__post-context {
font-size: $font__size-xs;
}
}

//! Font Sizes
.has-small-font-size {
font-size: $font__size-sm;
Expand Down
45 changes: 39 additions & 6 deletions newspack-theme/sass/site/primary/_posts-and-pages.scss
Original file line number Diff line number Diff line change
Expand Up @@ -638,15 +638,46 @@ body.page {
}
}

.entry-content #jp-relatedposts {
h3.jp-relatedposts-headline {
font-family: $font__heading;
/* Related Posts */

.jp-relatedposts-i2 {
em {
font-style: normal;
}

a {
font: bold $font__size-base $font__heading;
text-decoration: none;
}

.jp-related-posts-i2__post-date,
.jp-related-posts-i2__post-context {
font-size: $font__size-xs;
}
}

.entry-content .jp-relatedposts-i2 a,
.entry-content .jp-relatedposts-i2 a:visited {
color: $color__text-main;
}

.jp-related-posts-i2__row {
margin: 0 -10px;
}

.jp-relatedposts-i2,
#jp-relatedposts.jp-relatedposts {
clear: both;
font-family: $font__heading;
.jp-relatedposts-headline {
font: bold $font__size-xs $font__heading;
em::before {
display: none;
}
}
}

#jp-relatedposts.jp-relatedposts {
.jp-relatedposts-items-visual .jp-relatedposts-post {
opacity: 1;

Expand All @@ -659,15 +690,17 @@ body.page {
margin-bottom: #{0.25 * $size__spacing-unit};
a {
color: $color__text-main;
font-family: $font__heading;
font-size: $font__size-base;
font-weight: bold;
}
}

.jp-relatedposts-post-context {
color: $color__text-light;
.jp-relatedposts-post-date,
.jp-relatedposts-post-content {
opacity: 1;
}
}
.jp-reltaedposts-post-title {
font-family: $font__heading;
}
}
7 changes: 4 additions & 3 deletions newspack-theme/sass/style-editor-base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -669,9 +669,9 @@ ul.wp-block-archives,

// Jetpack Blocks
.jp-relatedposts-i2 {
border-top: 1px solid $color__border;
border-bottom: 1px solid $color__border;
padding: $size__spacing-unit 0;
a {
color: $color__text-main;
}
a,
strong {
font-family: $font__heading;
Expand All @@ -682,6 +682,7 @@ ul.wp-block-archives,

.jp-related-posts-i2__post-date,
.jp-related-posts-i2__post-context {
font-family: $font__heading;
font-size: $font__size-xs;
}
}
Expand Down