Skip to content

Commit

Permalink
Merge pull request #111 from tomusborne/release/2.4.2
Browse files Browse the repository at this point in the history
Release/2.4.2
  • Loading branch information
tomusborne authored Mar 17, 2020
2 parents cd3de8b + 290e5ad commit 6f641c6
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 42 deletions.
48 changes: 24 additions & 24 deletions css/admin/block-editor.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.editor-block-list__block a,
.editor-block-list__block a:visited,
.editor-block-list__block a:hover,
.editor-block-list__block a:focus {
.block-editor-block-list__block a,
.block-editor-block-list__block a:visited,
.block-editor-block-list__block a:hover,
.block-editor-block-list__block a:focus {
text-decoration: none;
}

.editor-block-list__layout pre {
.block-editor-block-list__layout pre {
background: rgba(0, 0, 0, 0.05);
font-family: inherit;
font-size: inherit;
Expand All @@ -17,7 +17,7 @@
color: inherit; /* editor only */
}

body .editor-block-list__block blockquote {
body .block-editor-block-list__block blockquote {
border-left: 5px solid rgba(0, 0, 0, 0.05);
padding: 20px;
font-size: 1.2em;
Expand All @@ -32,38 +32,38 @@ body .wp-block-quote:not(.is-large):not(.is-style-large) {
padding: 20px;
}

body .editor-block-list__block blockquote p:last-child {
body .block-editor-block-list__block blockquote p:last-child {
margin: 0;
}

.editor-block-list__layout table,
.editor-block-list__layout th,
.editor-block-list__layout td {
.block-editor-block-list__layout table,
.block-editor-block-list__layout th,
.block-editor-block-list__layout td {
border: 1px solid rgba(0, 0, 0, 0.1);
}

body .editor-block-list__block table {
body .block-editor-block-list__block table {
border-collapse: separate;
border-spacing: 0;
border-width: 1px 0 0 1px;
margin: 0 0 1.5em;
width: 100%;
}

.editor-block-list__layout th,
.editor-block-list__layout td {
.block-editor-block-list__layout th,
.block-editor-block-list__layout td {
padding: 8px;
}

.editor-block-list__layout th {
.block-editor-block-list__layout th {
border-width: 0 1px 1px 0;
}

.editor-block-list__layout td {
.block-editor-block-list__layout td {
border-width: 0 1px 1px 0;
}

body .editor-block-list__block hr {
body .block-editor-block-list__block hr {
background-color: rgba(0, 0, 0, 0.1);
border: 0;
height: 1px;
Expand All @@ -72,13 +72,13 @@ body .editor-block-list__block hr {
width: auto;
}

body .editor-block-list__block,
body .editor-block-list__block p {
body .block-editor-block-list__block,
body .block-editor-block-list__block p {
font-size: inherit;
}

body .editor-default-block-appender input[type=text].editor-default-block-appender__content,
body .editor-default-block-appender textarea.editor-default-block-appender__content {
body .block-editor-default-block-appender input[type=text].editor-default-block-appender__content,
body .block-editor-default-block-appender textarea.editor-default-block-appender__content {
font-family: inherit;
font-size: inherit;
}
Expand All @@ -87,7 +87,7 @@ body .editor-default-block-appender textarea.editor-default-block-appender__cont
## Gallery
--------------------------------------------------------------*/

.editor-block-list__layout .wp-block-gallery li figcaption {
.block-editor-block-list__layout .wp-block-gallery li figcaption {
background: rgba(255, 255, 255, 0.7);
color: #000;
padding: 10px;
Expand All @@ -98,7 +98,7 @@ body .editor-default-block-appender textarea.editor-default-block-appender__cont
# Button
--------------------------------------------------------------*/

.editor-block-list__layout .wp-block-button .wp-block-button__link {
.block-editor-block-list__layout .wp-block-button .wp-block-button__link {
font-size: inherit;
padding: 10px 15px;
line-height: normal;
Expand Down Expand Up @@ -151,7 +151,7 @@ button.content-title-visibility:before {
# Columns
--------------------------------------------------------------*/

.editor-block-list__block .wp-block-columns .wp-block-column {
.block-editor-block-list__block .wp-block-columns .wp-block-column {
margin-bottom: 0;
}

Expand All @@ -160,6 +160,6 @@ button.content-title-visibility:before {
--------------------------------------------------------------*/

.wp-block-shortcode label,
.wp-block-shortcode .editor-plain-text {
.wp-block-shortcode .block-editor-plain-text {
color: initial;
}
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}

// Set our theme version.
define( 'GENERATE_VERSION', '2.4.1' );
define( 'GENERATE_VERSION', '2.4.2' );

if ( ! function_exists( 'generate_setup' ) ) {
add_action( 'after_setup_theme', 'generate_setup' );
Expand Down
24 changes: 12 additions & 12 deletions inc/block-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ function generate_do_inline_block_editor_css() {
$css->add_property( 'max-width', $content_width_calc );
}

$css->set_selector( 'html body.gutenberg-editor-page .editor-block-list__block[data-align="full"]' );
$css->set_selector( 'html body.gutenberg-editor-page .block-editor-block-list__block[data-align="full"]' );
$css->add_property( 'max-width', 'none' );

$css->set_selector( '.edit-post-visual-editor .editor-block-list__block[data-align=wide]' );
$css->set_selector( '.edit-post-visual-editor .block-editor-block-list__block[data-align=wide]' );
$css->add_property( 'max-width', absint( $content_width ), false, 'px' );

if ( apply_filters( 'generate_do_group_inner_container_style', true ) ) {
Expand Down Expand Up @@ -212,7 +212,7 @@ function generate_do_inline_block_editor_css() {
$h6_family = generate_get_font_family_css( 'font_heading_6', 'generate_settings', generate_get_default_fonts() );
$buttons_family = generate_get_font_family_css( 'font_buttons', 'generate_settings', generate_get_default_fonts() );

$css->set_selector( 'body.gutenberg-editor-page .editor-block-list__block, body .editor-styles-wrapper' );
$css->set_selector( 'body.gutenberg-editor-page .block-editor-block-list__block, body .editor-styles-wrapper' );
$css->add_property( 'font-family', $body_family );
$css->add_property( 'font-size', absint( $font_settings['body_font_size'] ), false, 'px' );

Expand All @@ -233,7 +233,7 @@ function generate_do_inline_block_editor_css() {
$css->set_selector( 'body .editor-styles-wrapper, body .editor-styles-wrapper p, body .editor-styles-wrapper .mce-content-body' );
$css->add_property( 'line-height', floatval( $font_settings['body_line_height'] ) );

$css->set_selector( '.editor-styles-wrapper h1, .wp-block-heading h1.editor-rich-text__tinymce, .editor-post-title__block .editor-post-title__input' );
$css->set_selector( 'body .editor-styles-wrapper h1, .wp-block-heading h1.editor-rich-text__tinymce, .editor-post-title__block .editor-post-title__input' );
$css->add_property( 'font-family', 'inherit' === $h1_family || '' === $h1_family ? $body_family : $h1_family );
$css->add_property( 'font-weight', esc_attr( $font_settings['heading_1_weight'] ) );
$css->add_property( 'text-transform', esc_attr( $font_settings['heading_1_transform'] ) );
Expand All @@ -253,7 +253,7 @@ function generate_do_inline_block_editor_css() {
$css->add_property( 'color', esc_attr( $color_settings['content_title_color'] ) );
}

$css->set_selector( '.editor-styles-wrapper h2, .wp-block-heading h2.editor-rich-text__tinymce' );
$css->set_selector( 'body .editor-styles-wrapper h2, .wp-block-heading h2.editor-rich-text__tinymce' );
$css->add_property( 'font-family', $h2_family );
$css->add_property( 'font-weight', esc_attr( $font_settings['heading_2_weight'] ) );
$css->add_property( 'text-transform', esc_attr( $font_settings['heading_2_transform'] ) );
Expand All @@ -268,7 +268,7 @@ function generate_do_inline_block_editor_css() {
$css->add_property( 'color', esc_attr( generate_get_option( 'text_color' ) ) );
}

$css->set_selector( '.editor-styles-wrapper h3, .wp-block-heading h3.editor-rich-text__tinymce' );
$css->set_selector( 'body .editor-styles-wrapper h3, .wp-block-heading h3.editor-rich-text__tinymce' );
$css->add_property( 'font-family', $h3_family );
$css->add_property( 'font-weight', esc_attr( $font_settings['heading_3_weight'] ) );
$css->add_property( 'text-transform', esc_attr( $font_settings['heading_3_transform'] ) );
Expand All @@ -283,7 +283,7 @@ function generate_do_inline_block_editor_css() {
$css->add_property( 'color', esc_attr( generate_get_option( 'text_color' ) ) );
}

$css->set_selector( '.editor-styles-wrapper h4, .wp-block-heading h4.editor-rich-text__tinymce' );
$css->set_selector( 'body .editor-styles-wrapper h4, .wp-block-heading h4.editor-rich-text__tinymce' );
$css->add_property( 'font-family', $h4_family );
$css->add_property( 'font-weight', esc_attr( $font_settings['heading_4_weight'] ) );
$css->add_property( 'text-transform', esc_attr( $font_settings['heading_4_transform'] ) );
Expand All @@ -306,7 +306,7 @@ function generate_do_inline_block_editor_css() {
$css->add_property( 'color', esc_attr( generate_get_option( 'text_color' ) ) );
}

$css->set_selector( '.editor-styles-wrapper h5, .wp-block-heading h5.editor-rich-text__tinymce' );
$css->set_selector( 'body .editor-styles-wrapper h5, .wp-block-heading h5.editor-rich-text__tinymce' );
$css->add_property( 'font-family', $h5_family );
$css->add_property( 'font-weight', esc_attr( $font_settings['heading_5_weight'] ) );
$css->add_property( 'text-transform', esc_attr( $font_settings['heading_5_transform'] ) );
Expand All @@ -329,7 +329,7 @@ function generate_do_inline_block_editor_css() {
$css->add_property( 'color', esc_attr( generate_get_option( 'text_color' ) ) );
}

$css->set_selector( '.editor-styles-wrapper h6, .wp-block-heading h6.editor-rich-text__tinymce' );
$css->set_selector( 'body .editor-styles-wrapper h6, .wp-block-heading h6.editor-rich-text__tinymce' );
$css->add_property( 'font-family', $h6_family );
$css->add_property( 'font-weight', esc_attr( $font_settings['heading_6_weight'] ) );
$css->add_property( 'text-transform', esc_attr( $font_settings['heading_6_transform'] ) );
Expand All @@ -352,7 +352,7 @@ function generate_do_inline_block_editor_css() {
$css->add_property( 'color', esc_attr( generate_get_option( 'text_color' ) ) );
}

$css->set_selector( '.editor-block-list__layout .wp-block-button .wp-block-button__link' );
$css->set_selector( '.block-editor-block-list__layout .wp-block-button .wp-block-button__link' );
$css->add_property( 'font-family', $buttons_family );
$css->add_property( 'font-weight', esc_attr( $font_settings['buttons_font_weight'] ) );
$css->add_property( 'text-transform', esc_attr( $font_settings['buttons_font_transform'] ) );
Expand All @@ -370,15 +370,15 @@ function generate_do_inline_block_editor_css() {
$css->add_property( 'background', 'linear-gradient(' . $content_background . ',' . $content_background . '), linear-gradient(' . $body_background . ',' . $body_background . ')' );
}

$css->set_selector( '.editor-block-list__block a, .editor-block-list__block a:visited' );
$css->set_selector( '.block-editor-block-list__block a, .block-editor-block-list__block a:visited' );

if ( $color_settings['content_link_color'] ) {
$css->add_property( 'color', esc_attr( $color_settings['content_link_color'] ) );
} else {
$css->add_property( 'color', esc_attr( generate_get_option( 'link_color' ) ) );
}

$css->set_selector( '.editor-block-list__block a:hover, .editor-block-list__block a:focus, .editor-block-list__block a:active' );
$css->set_selector( '.block-editor-block-list__block a:hover, .block-editor-block-list__block a:focus, .block-editor-block-list__block a:active' );

if ( $color_settings['content_link_hover_color'] ) {
$css->add_property( 'color', esc_attr( $color_settings['content_link_hover_color'] ) );
Expand Down
11 changes: 9 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: two-columns, three-columns, one-column, right-sidebar, left-sidebar, footer-widgets, blog, e-commerce, flexible-header, full-width-template, buddypress, custom-header, custom-background, custom-menu, custom-colors, sticky-post, threaded-comments, translation-ready, rtl-language-support, featured-images, theme-options
Requires at least: 4.5
Tested up to: 5.3
Stable tag: 2.4.1
Tested up to: 5.4
Stable tag: 2.4.2

GeneratePress is a lightweight WordPress theme built with a focus on speed and usability.

Expand Down Expand Up @@ -95,6 +95,13 @@ MIT License: https://github.com/bgrins/TinyColor/blob/master/LICENSE

== Changelog ==

= 2.4.2 =

Release date: March 17, 2020

* Fix: Block editor classes changed in WordPress 5.4
* Fix: More specific heading selectors in block editor

= 2.4.1 =

Release date: November 26, 2019
Expand Down
6 changes: 3 additions & 3 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ Theme URI: https://generatepress.com
Author: Tom Usborne
Author URI: https://tomusborne.com
Description: GeneratePress is a lightweight WordPress theme built with a focus on speed and usability. Performance is important to us, which is why a fresh GeneratePress install adds less than 15kb (gzipped) to your page size. We take full advantage of the new block editor (Gutenberg), which gives you more control over creating your content. If you use page builders, GeneratePress is the right theme for you. It is completely compatible with all major page builders, including Beaver Builder and Elementor. Thanks to our emphasis on WordPress coding standards, we can boast full compatibility with all well-coded plugins, including WooCommerce. GeneratePress is fully responsive, uses valid HTML/CSS and is translated into over 25 languages by our amazing community of users. A few of our many features include microdata integration, 9 widget areas, 5 navigation locations, 5 sidebar layouts, dropdown menus (click or hover) and navigation color presets. Learn more and check out our powerful premium version at https://generatepress.com
Version: 2.4.1
Version: 2.4.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: generatepress
Tags: two-columns, three-columns, one-column, right-sidebar, left-sidebar, footer-widgets, blog, e-commerce, flexible-header, full-width-template, buddypress, custom-header, custom-background, custom-menu, custom-colors, sticky-post, threaded-comments, translation-ready, rtl-language-support, featured-images, theme-options
GeneratePress, Copyright 2014-2019 EDGE22 Studios LTD.
GeneratePress, Copyright 2014-2020 EDGE22 Studios LTD.
GeneratePress is distributed under the terms of the GNU GPL
GeneratePress is based on Underscores http://underscores.me/, (C) 2012-2019 Automattic, Inc.
GeneratePress is based on Underscores http://underscores.me/, (C) 2012-2020 Automattic, Inc.
*/

/*--------------------------------------------------------------
Expand Down

0 comments on commit 6f641c6

Please sign in to comment.