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

Update classes for custom typography #897

Merged
merged 4 commits into from
Apr 27, 2020
Merged
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
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