-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
a:not(.wp-element-button)
CSS rule conflicts with theme styles
#42616
Comments
cc @scruffian this looks to be a problem |
I can confirm this is causing issues in Twenty Twenty-Two as well. |
Yes, I will echo the above. I had to implement the following in Frost, which doesn’t seem optimal:
|
I have a proposal for a fix here: https://github.com/WordPress/gutenberg/pull/42669/files |
Should be fixed by #42669 |
Can still replicate this in WordPress Version 6.1.1. Has the fixed been released? Was also expecting that defining "textDecoration": false in the theme.json would have removed the CSS rule.
|
Just replying to my prior message, seems 'link' is the correct theme.json selector, which is a bit counter intuitive given headings use their HTML tag. Defining the below in the styles section of theme.json does remove the offending CSS.
|
@addedlovely please can you give replication steps? |
@scruffian Without the theme.json rule above, I get the default Whilst, I can change the script loading order to resolve, Reading over #42072 seems like it's trying to solve a non problem - |
The issue is that this selector is used by Global Styles to style every link. We need to the exception to ensure that links that We do need a broad selector for links you're right, which |
Description
Gutenberg is currently outputting the following style rule for themes with a
theme.json
file:Prior to #42072 (which landed in Gutenberg 13.7.0), this rule only used a simple
a
selector. But now that it has higher specificity, I've found it overriding various styles in the theme I'm using (namely, a child theme of Divi... the issue would also happen with base Divi if it had a theme.json).What is the purpose of this style to begin with? Links already use underlines by default in every browser that I know of. The rule seems redundant.
Step-by-step reproduction instructions
theme.json
.a:not(.wp-element-button)
styles.Screenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: