From 51fc4f76823038d30611bbc1ae7bc769621f0dd4 Mon Sep 17 00:00:00 2001 From: Laurel Date: Mon, 5 Jul 2021 09:15:32 -0700 Subject: [PATCH] fix: improve donate block appearance for WP 5.8 (#1398) --- newspack-theme/inc/color-patterns.php | 4 ++-- newspack-theme/sass/blocks/_blocks.scss | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/newspack-theme/inc/color-patterns.php b/newspack-theme/inc/color-patterns.php index ad8d6afe9..20f085748 100755 --- a/newspack-theme/inc/color-patterns.php +++ b/newspack-theme/inc/color-patterns.php @@ -55,7 +55,7 @@ function newspack_custom_colors_css() { *[class^="wp-block-"].is-style-solid-color.has-primary-background-color, .is-style-outline .wp-block-button__link.has-primary-background-color:not( :hover ), .wp-block-file .wp-block-file__button, - .site-content .wp-block-newspack-blocks-donate.tiered .wp-block-newspack-blocks-donate__tiers input[type="radio"]:checked + .tier-select-label, + div.wpbnbd.tiered .wp-block-newspack-blocks-donate__tiers input[type="radio"]:checked + .tier-select-label, .comment .comment-author .post-author-badge, .woocommerce .onsale, .woocommerce-store-notice { @@ -105,7 +105,7 @@ function newspack_custom_colors_css() { /* Header default background; default height */ body.h-db.h-dh .site-header .nav3 .menu-highlight a, .comment .comment-author .post-author-badge, - .site-content .wp-block-newspack-blocks-donate.tiered .wp-block-newspack-blocks-donate__tiers input[type="radio"]:checked + .tier-select-label, + div.wpbnbd.tiered .wp-block-newspack-blocks-donate__tiers input[type="radio"]:checked + .tier-select-label, .woocommerce .onsale, .woocommerce-store-notice { color: ' . esc_html( $primary_color_contrast ) . '; diff --git a/newspack-theme/sass/blocks/_blocks.scss b/newspack-theme/sass/blocks/_blocks.scss index 1475fee7d..eb29aeba2 100755 --- a/newspack-theme/sass/blocks/_blocks.scss +++ b/newspack-theme/sass/blocks/_blocks.scss @@ -232,6 +232,27 @@ p.has-background { } } +//! Newspack Donate Block +#secondary, +.desktop-sidebar, +.mobile-sidebar { + .wpbnbd.tiered .tiers { + margin-left: #{0.62 * $size__spacing-unit}; + margin-right: #{0.62 * $size__spacing-unit}; + } + .wpbnbd .thanks, + .wpbnbd button { + margin-left: $size__spacing-unit; + margin-right: $size__spacing-unit; + } +} + +.site-info .widget .wpbnbd { + .thanks { + margin: 0.5rem 1.5rem; + } +} + //! Columns .wp-block-columns { .wp-block-cover,