From 74bf23ce35f9a7c6f6d2a3a88895b4ca1fd844a6 Mon Sep 17 00:00:00 2001 From: Niels Lange Date: Wed, 15 Sep 2021 13:35:06 +0200 Subject: [PATCH] Twenty Twenty: Adjust font styles for filter and product grid blocks (https://github.com/woocommerce/woocommerce-blocks/pull/4749) * Twenty Twenty: Adjust font styles for filter and product grid blocks * Add missing CSS class for stock filter --- .../woocommerce-blocks/assets/css/editor.scss | 12 +++++++++++ .../woocommerce-blocks/assets/css/style.scss | 20 +++++++++++++++++-- .../assets/js/blocks/active-filters/block.js | 4 +++- .../assets/js/blocks/active-filters/edit.js | 1 + .../js/blocks/attribute-filter/block.js | 4 +++- .../assets/js/blocks/attribute-filter/edit.js | 1 + .../assets/js/blocks/price-filter/block.js | 4 +++- .../assets/js/blocks/price-filter/edit.js | 1 + .../assets/js/blocks/stock-filter/block.js | 4 +++- .../assets/js/blocks/stock-filter/edit.js | 1 + .../js/editor-components/block-title/index.js | 8 ++------ 11 files changed, 48 insertions(+), 12 deletions(-) diff --git a/plugins/woocommerce-blocks/assets/css/editor.scss b/plugins/woocommerce-blocks/assets/css/editor.scss index b4400dd2f7d..dc2747ff276 100644 --- a/plugins/woocommerce-blocks/assets/css/editor.scss +++ b/plugins/woocommerce-blocks/assets/css/editor.scss @@ -60,3 +60,15 @@ margin: 0; padding: 0; } + +.theme-twentytwenty { + .wp-block { + .wc-block-grid__product-title, + .wc-block-active-filters__title, + .wc-block-attribute-filter__title, + .wc-block-price-filter__title, + .wc-block-stock-filter__title { + @include font-size(regular); + } + } +} diff --git a/plugins/woocommerce-blocks/assets/css/style.scss b/plugins/woocommerce-blocks/assets/css/style.scss index 3bc8a430f72..e2d184cfad3 100644 --- a/plugins/woocommerce-blocks/assets/css/style.scss +++ b/plugins/woocommerce-blocks/assets/css/style.scss @@ -217,8 +217,8 @@ .wc-block-grid__product-title, .wc-block-components-product-title { font-family: $twentytwenty-headings; - color: #000; - font-size: 1.2em; + color: $twentytwenty-highlights-color; + @include font-size(regular); } .wp-block-columns .wc-block-components-product-title { @@ -285,6 +285,22 @@ z-index: 1; } + .wc-block-active-filters__title, + .wc-block-attribute-filter__title, + .wc-block-price-filter__title, + .wc-block-stock-filter__title { + @include font-size(regular); + } + + .wc-block-active-filters .wc-block-active-filters__clear-all { + @include font-size(smaller); + } + + .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link { + @include font-size(smaller); + padding: em($gap-smaller); + } + @media only screen and (min-width: 768px) { .wc-block-grid__products .wc-block-grid__product-onsale { @include font-size(small); diff --git a/plugins/woocommerce-blocks/assets/js/blocks/active-filters/block.js b/plugins/woocommerce-blocks/assets/js/blocks/active-filters/block.js index 021968541c5..62161897562 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/active-filters/block.js +++ b/plugins/woocommerce-blocks/assets/js/blocks/active-filters/block.js @@ -125,7 +125,9 @@ const ActiveFiltersBlock = ( { return ( <> { ! isEditor && blockAttributes.heading && ( - { blockAttributes.heading } + + { blockAttributes.heading } + ) }