Skip to content

Commit

Permalink
Separator block: Reduce default border styles to avoid conflicts with…
Browse files Browse the repository at this point in the history
… global styles (#60740)

Unlinked contributors: dashkevych.

Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>
Co-authored-by: tellthemachines <isabel_brison@git.wordpress.org>
  • Loading branch information
4 people authored Apr 16, 2024
1 parent 2242613 commit 5727784
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions packages/block-library/src/separator/style.scss
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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;
}

0 comments on commit 5727784

Please sign in to comment.