From 95ff6cef8318eeafef1c420e38dd6e55fc0624d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albert=20Juh=C3=A9=20Lluveras?= Date: Tue, 9 May 2023 09:06:19 +0200 Subject: [PATCH] Make sure colors don't break existing themes --- assets/js/blocks/mini-cart/frontend.ts | 2 +- assets/js/blocks/mini-cart/quantity-badge/style.scss | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/js/blocks/mini-cart/frontend.ts b/assets/js/blocks/mini-cart/frontend.ts index aead5843308..8fbe3e189b7 100644 --- a/assets/js/blocks/mini-cart/frontend.ts +++ b/assets/js/blocks/mini-cart/frontend.ts @@ -204,7 +204,7 @@ window.addEventListener( 'load', () => { `:where(.wp-block-woocommerce-mini-cart-contents) { background-color: ${ backgroundColor }; } - .wc-block-mini-cart__badge { + :where(.wc-block-mini-cart__badge) { background-color: ${ badgeBackgroundColor }; color: ${ badgeTextColor }; }` diff --git a/assets/js/blocks/mini-cart/quantity-badge/style.scss b/assets/js/blocks/mini-cart/quantity-badge/style.scss index cadbf5740f5..35203487961 100644 --- a/assets/js/blocks/mini-cart/quantity-badge/style.scss +++ b/assets/js/blocks/mini-cart/quantity-badge/style.scss @@ -22,7 +22,9 @@ transition: all 0.15s; white-space: nowrap; z-index: 1; +} +:where(.wc-block-mini-cart__badge) { // These values will be overridden in JS. background-color: transparent; color: transparent;