From 05b1b0f32fae9d719baae39dc23dc4194bf024c8 Mon Sep 17 00:00:00 2001 From: kmanijak Date: Wed, 14 Dec 2022 08:17:19 +0100 Subject: [PATCH] Fix the incorrect layout of Rating and Price in Classic Template and Products block (https://github.com/woocommerce/woocommerce-blocks/pull/7932) * Fix the incorrect layout of Rating and Price in Classic Template There were styles required in Rating Filter that were added globally and influenced the layout of Rating in Products block as well as Classic template. The styles were moved to the Rating Filter block --- .../assets/js/base/components/product-rating/index.tsx | 1 - .../assets/js/base/components/product-rating/style.scss | 7 ------- .../assets/js/blocks/rating-filter/style.scss | 6 ++++++ 3 files changed, 6 insertions(+), 8 deletions(-) delete mode 100644 plugins/woocommerce-blocks/assets/js/base/components/product-rating/style.scss diff --git a/plugins/woocommerce-blocks/assets/js/base/components/product-rating/index.tsx b/plugins/woocommerce-blocks/assets/js/base/components/product-rating/index.tsx index 5b9bd6a91e1..bc391b3fe70 100644 --- a/plugins/woocommerce-blocks/assets/js/base/components/product-rating/index.tsx +++ b/plugins/woocommerce-blocks/assets/js/base/components/product-rating/index.tsx @@ -7,7 +7,6 @@ import { __, sprintf } from '@wordpress/i18n'; /** * Internal dependencies */ -import './style.scss'; const Rating = ( { className, diff --git a/plugins/woocommerce-blocks/assets/js/base/components/product-rating/style.scss b/plugins/woocommerce-blocks/assets/js/base/components/product-rating/style.scss deleted file mode 100644 index 6827532c30d..00000000000 --- a/plugins/woocommerce-blocks/assets/js/base/components/product-rating/style.scss +++ /dev/null @@ -1,7 +0,0 @@ -.wc-block-components-product-rating { - &__stars { - display: inline-block; - line-height: 1; - height: 1em; - } -} diff --git a/plugins/woocommerce-blocks/assets/js/blocks/rating-filter/style.scss b/plugins/woocommerce-blocks/assets/js/blocks/rating-filter/style.scss index 5a6c27e68ad..80a7bdfb5a2 100644 --- a/plugins/woocommerce-blocks/assets/js/blocks/rating-filter/style.scss +++ b/plugins/woocommerce-blocks/assets/js/blocks/rating-filter/style.scss @@ -29,6 +29,12 @@ } } + .wc-block-components-product-rating__stars { + display: inline-block; + line-height: 1; + height: 1em; + } + .wc-blocks-components-form-token-field-wrapper { flex-grow: 1; max-width: unset;