-
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
Why are Gutenberg's default styles so opinionated on appearance? #15574
Comments
Hi @benlk, Thanks for the report. I've looked into the issues you mentioned.
That is currently the case. The more opinionated styles are defined in a separate Unfortunately the caption styles for images were only recently moved over to the theme.scss file (#14366). WordPress 5.2 shipped with them as part of the default block styles. In a future release they should be part of the opt-in styles.
In the code snippet
That should be the case if that issue is solved, it doesn't look like there's anyone working on this at the moment. Volunteers are very welcome 😄. I think I answered all the questions, and the issues seem to have been solved as far as I can tell, so I'll close the issue for now. It can always be reopened if on further discussion it turns out there is are outstanding tasks. Also marking as a duplicate of #12299 which seems to have the same kind of discussion. |
I was running just WordPress 5.2, so yeah, these have probably all been fixed in the latest version of the Gutenberg plugin by now. |
No, still not fixed in WordPress 5.4 till now. |
It may be related #21658 |
I am curious about the default styles as well. Several items use the root pseudo-selector for things like font sizes and a bunch of colors. This seems like an unnecessary level of specificity. I don't feel like I should need to try to outweigh default styles. Also, at 48k or so, while not exactly a large file by today's standards, I think this stylesheet should be as light as possible. It bothers me that there is so many one-off classes like 200 lines of social logo colors included. Just make them all inherit the font color. If theme developers want specific colors, let them do that. Then there is fixed pixel font sizing instead of relative. That could be better. |
Agreed, there is a long standing issue for that at #11671 |
This is kind of an issue about selector specificity, and could be considered a sub-issue of #12299
Why does the default block-styles stylesheet make figcaptions centered? In 5.1RC2 the selector for this is more opinionated than I expected it to be:
I get that the layout styles need a certain specificity:
But why does Gutenberg's default stylesheet
/wp-includes/css/dist/block-library/style.min.css?ver=5.2-RC1
ship with rules that:Potential resolutions:
The text was updated successfully, but these errors were encountered: