Skip to content

Commit 2f70fdd

Browse files
Update separator styles
1 parent ddc2602 commit 2f70fdd

File tree

2 files changed

+21
-31
lines changed

2 files changed

+21
-31
lines changed

packages/block-library/src/separator/editor.scss

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,4 @@
22
// Prevent margin collapsing so the area to select the separator is bigger.
33
padding-top: 0.1px;
44
padding-bottom: 0.1px;
5-
6-
// This is also set in style.scss, but needs a higher specificity in editor
7-
// due to the way that color block supports adds additional background color styles.
8-
&.wp-block-separator.is-style-dots {
9-
background: none !important;
10-
border: none;
11-
}
125
}
Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,4 @@
11
.wp-block-separator {
2-
// Dots style
3-
&.is-style-dots {
4-
// Override any background themes often set on the hr tag for this style.
5-
// also override the color set in the editor since it's intented for normal HR
6-
background: none !important;
7-
border: none;
8-
text-align: center;
9-
line-height: 1;
10-
height: auto;
11-
12-
&::before {
13-
content: "\00b7 \00b7 \00b7";
14-
color: currentColor;
15-
font-size: 1.5em;
16-
letter-spacing: 2em;
17-
/*rtl:ignore*/
18-
padding-left: 2em;
19-
font-family: serif;
20-
}
21-
}
22-
}
23-
24-
// Lowest specificity to avoid overriding global styles.
25-
:where(.wp-block-separator) {
262
border-top: 2px solid currentColor;
273
// Default, thin style, is stored in theme.scss so it can be opted out of
284

@@ -31,3 +7,24 @@
317
border-right: none;
328
border-bottom: none;
339
}
10+
11+
// Dots block style variation
12+
:root :where(.wp-block-separator.is-style-dots) {
13+
// Override any background themes often set on the hr tag for this style.
14+
// also override the color set in the editor since it's intended for normal HR
15+
background: none !important;
16+
border: none;
17+
text-align: center;
18+
line-height: 1;
19+
height: auto;
20+
21+
&::before {
22+
content: "\00b7 \00b7 \00b7";
23+
color: currentColor;
24+
font-size: 1.5em;
25+
letter-spacing: 2em;
26+
/*rtl:ignore*/
27+
padding-left: 2em;
28+
font-family: serif;
29+
}
30+
}

0 commit comments

Comments
 (0)