-
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
Global Styles: Add support for default styles #27796
Comments
I agree that it makes sense to allow blocks to use the theme.json system to apply styles to themselves. But regarding showing what is the default at the block level e.g: the padding is 1em, even if we specify styles using block.json it is something very complex. The default can be from the theme or from the user or some pattern and when we have semantic nesting on theme.json, the same verse block may have a padding of 1em, when on single post view and 0.5em when rendered on the post list so what default would we show for padding at the block level? |
@scruffian do we have something actionable here or is it mostly covered? |
I believe the way forward here is outlined in #34180 |
Looking at #34180 it seems this may now be resolved. @scruffian can you confirm whether this issue can be closed or not? |
From #27579:
As noted on that PR, setting default styles in the way the handbook recommends results in validation errors in the block.
As can be seen in #27582, if we set these values in CSS rather than in the JSON then when the user resets the setting, the CSS takes control, which is confusing for the user.
I agree with @gziolo that we should be able to set this in the block.json somehow.
cc @nosolosw @jorgefilipecosta
The text was updated successfully, but these errors were encountered: