-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Styles specificity: allow comment form input overrides #62960
Conversation
Size Change: +66 B (0%) Total Size: 1.76 MB
ℹ️ View Unchanged
|
Flaky tests detected in a90f2eb. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9710331970
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Thanks for the PR! Could you add some steps to test so we can make sure we're all looking at the same problem? 😅 |
a90f2eb
to
fb5da4f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes the immediate issue at hand. To test I updated my theme.json to have the following:
"core/post-comments-form": {
"css": "& textarea, input{border-radius:.33rem; border: 5px solid red;}"
},
In trunk I'm seeing the input not receive the border style. In this PR it is.
Knowing that basically any CSS property can be modified with global styles through custom CSS makes me wonder if we should reduce all block styles to 0-1-0.
Yep, I wonder about this too.
Co-authored-by: ellatrix <[email protected]> Co-authored-by: tellthemachines <[email protected]> Co-authored-by: talldan <[email protected]>
I just cherry-picked this PR to the wp/6.6 branch to get it included in the next release: d995412 |
Co-authored-by: ellatrix <[email protected]> Co-authored-by: tellthemachines <[email protected]> Co-authored-by: talldan <[email protected]>
Co-authored-by: ellatrix <[email protected]> Co-authored-by: tellthemachines <[email protected]> Co-authored-by: talldan <[email protected]>
What?
Similar to #63049.
See #62679 (comment)
Apparently, global styles allows for overrides with completely custom CSS, which means comment form input and textarea CSS should be possible to override. The problem of course is that the global styles specificity is forced at 0-1-0, while the default styles are higher. This PR lowers them.
Knowing that basically any CSS property can be modified with global styles through custom CSS makes me wonder if we should reduce all block styles to 0-1-0.
Why?
Fixes remaining issue from #62679.
How?
Lower specificity to 0-1-0.
Testing Instructions
Ensure this theme rule works:
Testing Instructions for Keyboard
Screenshots or screencast