Skip to content

Commit

Permalink
* fix: update typography selectors for editor (#897)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurelfulford committed Apr 27, 2020
1 parent 1da6e44 commit 37e6bb8
Showing 1 changed file with 21 additions and 14 deletions.
35 changes: 21 additions & 14 deletions newspack-theme/inc/typography.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,12 @@ function newspack_custom_typography_css() {
/* _blocks.scss */
.wp-block-latest-comments .wp-block-latest-comments__comment-meta,
.wp-block-pullquote cite,
.entry .entry-content .wp-block-categories li,
.entry .entry-content .wp-block-archives li,
.entry .entry-content .wp-block-latest-posts li > a,
.entry .entry-content .wp-block-latest-posts time,
.entry .entry-content .wp-block-file,
.entry .entry-content .wp-block-file .wp-block-file__button,
/* _widgets.scss */
.widget,
Expand Down Expand Up @@ -201,28 +205,30 @@ function newspack_custom_typography_css() {
}

$editor_css_blocks .= '
.block-editor-block-list__layout .block-editor-block-list__block h1,
.block-editor-block-list__layout .block-editor-block-list__block h2,
.block-editor-block-list__layout .block-editor-block-list__block h3,
.block-editor-block-list__layout .block-editor-block-list__block h4,
.block-editor-block-list__layout .block-editor-block-list__block h5,
.block-editor-block-list__layout .block-editor-block-list__block h6,
.edit-post-visual-editor.editor-styles-wrapper h1,
.edit-post-visual-editor.editor-styles-wrapper h2,
.edit-post-visual-editor.editor-styles-wrapper h3,
.edit-post-visual-editor.editor-styles-wrapper h4,
.edit-post-visual-editor.editor-styles-wrapper h5,
.edit-post-visual-editor.editor-styles-wrapper h6,
.block-editor-block-list__layout .block-editor-block-list__block figcaption,
.block-editor-block-list__layout .block-editor-block-list__block .gallery-caption,
.block-editor-block-list__layout .block-editor-block-list__block .cat-links,
/* Post Title */
.editor-styles-wrapper .editor-post-title .editor-post-title__block .editor-post-title__input,
.edit-post-visual-editor.editor-styles-wrapper .editor-post-title__block .editor-post-title__input,
/* Table Block */
.block-editor-block-list__layout .block-editor-block-list__block .wp-block-table,
/* Homepage Posts Block */
.block-editor-block-list__layout .wpnbha .entry-title,
.block-editor-block-list__layout .wpnbha .entry-meta,
/* Cover Block */
.block-editor-block-list__layout .block-editor-block-list__block .wp-block-cover h2,
.block-editor-block-list__layout .block-editor-block-list__block .wp-block-cover .wp-block-cover-text,
/* Table Block */
.block-editor-block-list__layout .block-editor-block-list__block .wp-block-table th,
.block-editor-block-list__layout .block-editor-block-list__block .wp-block-table td,
/* Button Block */
.block-editor-block-list__layout .block-editor-block-list__block .wp-block-button .wp-block-button__link,
.edit-post-visual-editor.editor-styles-wrapper .wp-block-button__link,
.edit-post-visual-editor.editor-styles-wrapper .wp-block-button .wp-block-button__link,
/* Blockquote Block */
.block-editor-block-list__layout .block-editor-block-list__block .wp-block-quote cite,
Expand Down Expand Up @@ -346,7 +352,8 @@ function newspack_custom_typography_css() {
}

$editor_css_blocks .= '
.block-editor-block-list__layout .block-editor-block-list__block,
#newspack-post-subtitle-element,
.block-editor-block-list__layout,
.editor-default-block-appender .editor-default-block-appender__content
{
font-family: ' . wp_kses( $font_body, null ) . ';
Expand Down

0 comments on commit 37e6bb8

Please sign in to comment.