Skip to content

Commit e7496e1

Browse files
Lower specificity of tag cloud variation selectors
1 parent ee03f23 commit e7496e1

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

packages/block-library/src/tag-cloud/style.scss

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,20 @@
2222
margin-left: 5px;
2323
text-decoration: none;
2424
}
25+
}
2526

26-
&.is-style-outline {
27-
display: flex;
28-
flex-wrap: wrap;
29-
gap: 1ch;
30-
31-
a {
32-
border: 1px solid currentColor;
33-
font-size: unset !important; // !important Needed to override the inline styles.
34-
margin-right: 0;
35-
padding: 1ch 2ch;
36-
text-decoration: none !important; // !important needed to override generic post content link decoration.
37-
}
38-
}
27+
// Zero specificity selectors for block style variations to match global styles specificity.
28+
:where(.wp-block-tag-cloud.is-style-outline) {
29+
display: flex;
30+
flex-wrap: wrap;
31+
gap: 1ch;
32+
}
33+
// The block support related styles below haven't been replicated in the base theme.json
34+
// as the block doesn't yet adopt them for its inner links.
35+
:where(.wp-block-tag-cloud.is-style-outline a) {
36+
border: 1px solid currentColor;
37+
font-size: unset !important; // !important Needed to override the inline styles.
38+
margin-right: 0;
39+
padding: 1ch 2ch;
40+
text-decoration: none !important; // !important needed to override generic post content link decoration.
3941
}

0 commit comments

Comments
 (0)