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

Button Block: Change text-decoration style to low specificity #42545

Merged
merged 1 commit into from
Jul 21, 2022
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
4 changes: 3 additions & 1 deletion packages/block-library/src/button/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ $blocks-block__margin: 0.5em;
cursor: pointer;
display: inline-block;
text-align: center;
text-decoration: none;
word-break: break-word; // overflow-wrap doesn't work well if a link is wrapped in the div, so use word-break here.
box-sizing: border-box;

Expand All @@ -32,6 +31,9 @@ $blocks-block__margin: 0.5em;
// These rules are set to zero specificity to keep the default styles for buttons.
// They are needed for backwards compatibility.
:where(.wp-block-button__link) {
// This needs a low specificity so it won't override the rules from the button element if defined in theme.json.
text-decoration: none;

// 100% causes an oval, but any explicit but really high value retains the pill shape.
border-radius: 9999px;

Expand Down