-
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
Button outline style not working on hybrid themes after v6.6 #64225
Comments
@hmouhtar Could you provide more info about your hybrid theme? What block theme features does it taking advantage of? (e.g. template parts, theme.json)
I'm not sure this would be considered a supported use case, as this is taking advantage of block features (block style variations) without using a block properly. It'd be good to get some wider input though, as I personally don't have a great deal of familiarity with how hybrid themes are being implemented and what's supported. |
I am using the wp-block-button class in a custom menu and have reproduced the same problem. It is used to unify the look of the buttons on the site.
|
Just to give a breakdown of the problem, as it hasn't been mentioned yet. The issue is that block style variations moved to using a classname like It's definitely an interesting one. I can see the use case for hybrid themes utilizing block styles for consistency, but at the same time it leaves that static html very open to bugs when the block implementation changes. |
This is the cause of the problem, and I don't think it's fundamentally due to the type of theme. You can also reproduce this problem with block themes.
WP6.6.1The CSS specificity is WP6.5.5The CSS selector for applying the background color for the outline style ( In a hybrid theme that has a theme.json, we may want to write block HTML directly in the theme template in order to apply block CSS styles generated from theme.json definitions to the theme templates as well. In this case, it seems there is currently no way to work around this other than using some kind of custom CSS. |
Further to this, I'd like to point out that until the core teams' plan for block themes, Custom CSS is a band-aid that introduces new problems:
|
Hi, |
Description
The new CSS specificity changes in v6.6 are breaking the outline button style on hybrid themes.
Before the new specificity changes, outlined buttons had a background color of "initial." However, since v6.6, that property is being overriden, as seen in the screenshot below:
This problem is not visible when using Gutenberg, because the block style variations CSS is being rendered inline since v6.6: block-style-variations.php.
But on hybrid themes with coded templates, the outline style is broken.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
The text was updated successfully, but these errors were encountered: