Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separator block: Reduce default border styles to avoid conflicts with global styles #60740

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
Loading