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

a:where(:not(.wp-element-button)) is overwriting all anchor tags on site in 14.0.3 #44166

Open
cb911nr opened this issue Sep 14, 2022 · 2 comments
Labels
Global Styles [Type] Bug An existing feature is broken.

Comments

@cb911nr
Copy link

cb911nr commented Sep 14, 2022

Description

Installed the latest plugin for development features, and it's adding new CSS for

a:where(:not(.wp-element-button)) {
                text-decoration: underline;
            }

Inside <style id='global-styles-inline-css' type='text/css'>

But this is adding text-decoration underline to all anchors on our site, because this loads after our stylesheet..

Is there a way to remove this css line? Or have another way of dealing with it like getting this to inject prior to our stylesheet?

Step-by-step reproduction instructions

Install the 14.0.3 release plugin, styles are then outputted

Screenshots, screen recording, code snippet

No response

Environment info

No response

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

@cb911nr
Copy link
Author

cb911nr commented Sep 19, 2022

Was able to just remove line 95 from

lib/compat/wordpress-6.1/class-wp-theme-json-6-1.php

Which resolved this issue.

@straightvisions-matthias-bathke

You shouldn't remove or edit lines in core code, as it's not update save. Changing this default behavior is theme territory.

Disable default link text decoration underline injected by Gutenberg via theme.json:
{ "version":2, "styles":{ "elements":{ "link":{ "typography":{ "textDecoration":false } } } } }

output of a:where(:not(.wp-element-button)) { text-decoration: underline; } will be omitted then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles [Type] Bug An existing feature is broken.
Projects
None yet
Development

No branches or pull requests

4 participants