Skip to content

Commit

Permalink
Button block: reduce chance of style conflicts. (#24919)
Browse files Browse the repository at this point in the history
Follow up to #24599.

Using the child combinator (instead of the descendant combinator) narrows the selector without increasing its specificity. This should help reduce the likelihood of a style issue occurring when a parent element has an `is-style-outline` CSS class.

https://developer.mozilla.org/en-US/docs/Web/CSS/Child_combinator
  • Loading branch information
ZebulanStanphill committed Oct 19, 2020
1 parent 52db498 commit 891482c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-library/src/button/style.scss
Expand Up @@ -47,7 +47,7 @@ $blocks-button__height: 3.1em;
border-radius: 0 !important;
}

.is-style-outline .wp-block-button__link,
.is-style-outline > .wp-block-button__link,
.wp-block-button__link.is-style-outline {
color: #32373c;
background-color: transparent;
Expand Down

0 comments on commit 891482c

Please sign in to comment.