-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed as not planned
Closed as not planned
Copy link
Labels
[Feature] Theme Style VariationsRelated to style variations provided by block themesRelated to style variations provided by block themes[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
JSON files in theme styles folder used to register if you only had a title and slug property (along with blockTypes), this would add the CSS class to the block and allow you to style externally or hook into with JavaScript, etc.
Now it seems those files are ignored unless you specify an external stylesheet in the JSON or you use some kind of style in the schema.
Step-by-step reproduction instructions
- Create
theme/styles/blocks/gallery-1.json{ "$schema": "https://schemas.wp.org/trunk/theme.json", "version": 3, "title": "Slideshow", "slug": "slider", "blockTypes": [ "core/gallery" ] } - Load admin, insert Gallery block, notice there is no style option for "Slideshow"
- Add
stylesto JSON"styles": { "spacing": { "padding": { "top": "0" } } }
- Reload admin, you'll see "Slideshow" as option for style
Screenshots, screen recording, code snippet
No response
Environment info
- WordPress 6.8.3
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
Please confirm which theme type you used for testing.
- Block
- Classic
- Hybrid (e.g. classic with theme.json)
- Not sure
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Feature] Theme Style VariationsRelated to style variations provided by block themesRelated to style variations provided by block themes[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Type
Fields
Give feedbackNo fields configured for issues without a type.