Skip to content

Commit

Permalink
fix: make sure accent header in the editor matches the front end (#1112)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurelfulford authored Oct 20, 2020
1 parent 3748d6f commit 11e4970
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 14 deletions.
4 changes: 2 additions & 2 deletions newspack-joseph/inc/child-typography.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function newspack_joseph_custom_typography_css() {
font-family: ' . wp_kses( $font_header, null ) . ';
}
.block-editor-block-list__layout .block-editor-block-list__block .article-section-title,
.block-editor-block-list__layout .block-editor-block-list__block .accent-header {
.block-editor-block-list__layout .block-editor-block-list__block.accent-header {
font-family: inherit;
}';
}
Expand All @@ -76,7 +76,7 @@ function newspack_joseph_custom_typography_css() {
}
';
$editor_css_blocks .= '
.block-editor-block-list__layout .block-editor-block-list__block .accent-header,
.block-editor-block-list__layout .block-editor-block-list__block.accent-header,
.block-editor-block-list__layout .block-editor-block-list__block .article-section-title {
text-transform: uppercase;
}
Expand Down
1 change: 1 addition & 0 deletions newspack-joseph/sass/style-editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ Newspack Sacha Editor Styles
flex: 1 0 0.25rem;
height: 1px;
margin: 0 0 0 0.25rem;
position: relative !important;
}
}

Expand Down
4 changes: 2 additions & 2 deletions newspack-katharine/inc/child-color-patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ function newspack_katharine_custom_colors_css() {

$editor_css = '
.block-editor-block-list__layout .block-editor-block-list__block .entry-meta .byline a,
.block-editor-block-list__layout .block-editor-block-list__block .accent-header,
.block-editor-block-list__layout .block-editor-block-list__block.accent-header,
.block-editor-block-list__layout .block-editor-block-list__block .wp-block-newspack-blocks-homepage-articles:not(.has-text-color) .article-section-title {
color: ' . esc_html( newspack_color_with_contrast( $primary_color ) ) . ';
}
.block-editor-block-list__layout .block-editor-block-list__block .accent-header:before,
.block-editor-block-list__layout .block-editor-block-list__block.accent-header:before,
.block-editor-block-list__layout .block-editor-block-list__block .article-section-title:before,
.block-editor-block-list__layout .block-editor-block-list__block figcaption:after,
.block-editor-block-list__layout .block-editor-block-list__block .wp-caption-text:after {
Expand Down
2 changes: 1 addition & 1 deletion newspack-katharine/inc/child-typography.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function newspack_katharine_custom_typography_css() {
}
';
$editor_css_blocks .= '
.block-editor-block-list__layout .block-editor-block-list__block .accent-header,
.block-editor-block-list__layout .block-editor-block-list__block.accent-header,
.block-editor-block-list__layout .block-editor-block-list__block .article-section-title,
.block-editor-block-list__layout .block-editor-block-list__block .entry-meta .byline a,
.block-editor-block-list__layout .block-editor-block-list__block .entry-meta .entry-date {
Expand Down
3 changes: 2 additions & 1 deletion newspack-katharine/sass/style-editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ Newspack Katharine Editor Styles
.article-section-title {
color: $color__primary;
font-size: $font__size-xs;
margin: 0 0 #{1.5 * $size__spacing-unit};
margin-bottom: #{1.5 * $size__spacing-unit};
margin-top: 0;

&::before {
background-color: $color__primary;
Expand Down
2 changes: 1 addition & 1 deletion newspack-nelson/inc/child-typography.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function newspack_nelson_custom_typography_css() {
}
';
$editor_css_blocks .= '
.block-editor-block-list__layout .block-editor-block-list__block .accent-header,
.block-editor-block-list__layout .block-editor-block-list__block.accent-header,
.block-editor-block-list__layout .block-editor-block-list__block .article-section-title,
.block-editor-block-list__layout .block-editor-block-list__block .entry-meta .byline a,
.block-editor-block-list__layout .block-editor-block-list__block .cat-links {
Expand Down
2 changes: 1 addition & 1 deletion newspack-sacha/inc/child-color-patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function newspack_sacha_custom_colors_css() {

$editor_css = '
.block-editor-block-list__layout .block-editor-block-list__block .entry-meta .byline a,
.block-editor-block-list__layout .block-editor-block-list__block .accent-header,
.block-editor-block-list__layout .block-editor-block-list__block.accent-header,
.block-editor-block-list__layout .block-editor-block-list__block .wp-block-newspack-blocks-homepage-articles:not(.has-text-color) .article-section-title {
color: ' . esc_html( newspack_color_with_contrast( $primary_color ) ) . ';
}
Expand Down
2 changes: 1 addition & 1 deletion newspack-sacha/inc/child-typography.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function newspack_sacha_custom_typography_css() {
}
';
$editor_css_blocks .= '
.block-editor-block-list__layout .block-editor-block-list__block .accent-header,
.block-editor-block-list__layout .block-editor-block-list__block.accent-header,
.block-editor-block-list__layout .block-editor-block-list__block .article-section-title {
text-transform: uppercase;
}
Expand Down
2 changes: 1 addition & 1 deletion newspack-scott/inc/child-color-patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function newspack_scott_custom_colors_css() {
}

$editor_css = '
.block-editor-block-list__layout .block-editor-block-list__block .accent-header:not(.widget-title):before,
.block-editor-block-list__layout .block-editor-block-list__block.accent-header:before,
.block-editor-block-list__layout .block-editor-block-list__block .article-section-title:before {
background-color: ' . esc_html( $primary_color ) . ';
}
Expand Down
2 changes: 1 addition & 1 deletion newspack-scott/inc/child-typography.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function newspack_scott_custom_typography_css() {
}
';
$editor_css_blocks .= '
.block-editor-block-list__layout .block-editor-block-list__block .accent-header,
.block-editor-block-list__layout .block-editor-block-list__block.accent-header,
.block-editor-block-list__layout .block-editor-block-list__block .article-section-title {
text-transform: uppercase;
}
Expand Down
2 changes: 1 addition & 1 deletion newspack-theme/inc/color-patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ function newspack_custom_colors_css() {
$editor_css .= '
.block-editor-block-list__layout .block-editor-block-list__block .entry-meta .byline a,
.block-editor-block-list__layout .block-editor-block-list__block .wp-block-newspack-blocks-homepage-articles:not(.has-text-color) .article-section-title,
.block-editor-block-list__layout .block-editor-block-list__block .accent-header {
.block-editor-block-list__layout .block-editor-block-list__block.accent-header {
color: ' . esc_html( newspack_color_with_contrast( $primary_color ) ) . ';
}
';
Expand Down
2 changes: 1 addition & 1 deletion newspack-theme/inc/typography.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ function newspack_custom_typography_css() {
}
';
$editor_css_blocks .= '
.block-editor-block-list__layout .block-editor-block-list__block .accent-header,
.block-editor-block-list__layout .block-editor-block-list__block.accent-header,
.block-editor-block-list__layout .block-editor-block-list__block .article-section-title {
text-transform: uppercase;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
border-bottom: 4px solid $color__border;
color: $color__primary;
font-size: $font__size-sm;
margin: 0 0 #{$size__spacing-unit * 0.75};
margin-top: 0;
margin-bottom: #{$size__spacing-unit * 0.75};
padding: 0 0 #{$size__spacing-unit * 0.33};
}

0 comments on commit 11e4970

Please sign in to comment.