From d7fe6f73d8ce9ce80af963e971cf5a37edc1595a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tetsuaki=20Hamano=20/=20=E6=B5=9C=E9=87=8E=20=E5=93=B2?= =?UTF-8?q?=E6=98=8E?= Date: Wed, 20 Jul 2022 05:09:29 +0000 Subject: [PATCH] Button Block: Change text-decoration style to low specificity --- packages/block-library/src/button/style.scss | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/button/style.scss b/packages/block-library/src/button/style.scss index b76aeb0daa784..e5544d7e14808 100644 --- a/packages/block-library/src/button/style.scss +++ b/packages/block-library/src/button/style.scss @@ -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; @@ -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;