Button Block: Change text-decoration style to low specificity#42545
Merged
Conversation
dce1c36 to
d7fe6f7
Compare
|
Size Change: -6 B (0%) Total Size: 1.26 MB
ℹ️ View Unchanged
|
Contributor
|
Not a blocker: I'm not sure sure about the change requested to the theme as this a default style part of the theme design. Changing the underline should be a choice, I mean that changing the block or global style setting should override the default style? |
carolinan
approved these changes
Jul 20, 2022
carolinan
left a comment
Contributor
There was a problem hiding this comment.
I have confirmed that the underline displays on the front.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #42292
What?
This PR reduces the specificity of
text-decorationstyle given to.wp-block-button__linkin the front end style ofcore/button.Why?
Text decoration styles may be defined in
theme.json.In addition, if
textDecorationis specified instyles.elements.button,.wp-block-button__linkis also subjected to it.However, the settings in
theme.jsonare not reflected becausetext-decoration:noneis defined as the default button style.How?
I have reduced the specificity of the default style of the buttons, referring to #41393.
Testing Instructions
text-decorationis none as before.textDecorationto "underline" for the button element:{ "styles": { "elements": { "button": { "typography": { "textDecoration": "underline" } } } } }Screenshots or screencast
Point of Concern
In Twenty Twenty Two, if
textDecoration: "underline"is applied to a button element, it changes to dashed style on hover or focus.However, I think this is an issue that should be addressed on the theme side.