From 912806448de98519c39bdd528d16f089217ea106 Mon Sep 17 00:00:00 2001 From: Andrew Serong <14988353+andrewserong@users.noreply.github.com> Date: Mon, 15 Apr 2024 16:11:10 +1000 Subject: [PATCH] Separator block: Reduce default border styles to avoid conflicts with global styles --- .../block-library/src/separator/style.scss | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/packages/block-library/src/separator/style.scss b/packages/block-library/src/separator/style.scss index 84622211e5a207..d40dd2f05844ed 100644 --- a/packages/block-library/src/separator/style.scss +++ b/packages/block-library/src/separator/style.scss @@ -1,12 +1,4 @@ .wp-block-separator { - border-top: 2px solid currentColor; - // Default, thin style, is stored in theme.scss so it can be opted out of - - // Unset the left, right and bottom borders by default, otherwise some browsers will render them as "inset". - border-left: none; - border-right: none; - border-bottom: none; - // Dots style &.is-style-dots { // Override any background themes often set on the hr tag for this style. @@ -28,3 +20,14 @@ } } } + +// Lowest specificity to avoid overriding global styles. +:where(.wp-block-separator) { + border-top: 2px solid currentColor; + // Default, thin style, is stored in theme.scss so it can be opted out of + + // Unset the left, right and bottom borders by default, otherwise some browsers will render them as "inset". + border-left: none; + border-right: none; + border-bottom: none; +}