-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Extend theme.json to provide spacing size presets #39371
Copy link
Copy link
Open
Labels
Developer ExperienceIdeas about improving block and theme developer experienceIdeas about improving block and theme developer experienceNeeds Design FeedbackNeeds general design feedback.Needs general design feedback.[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.Questions or issues with incorporating or styling blocks in a theme.[Type] Tracking IssueTactical breakdown of efforts across the codebase and/or tied to Overview issues.Tactical breakdown of efforts across the codebase and/or tied to Overview issues.
Metadata
Metadata
Assignees
Labels
Developer ExperienceIdeas about improving block and theme developer experienceIdeas about improving block and theme developer experienceNeeds Design FeedbackNeeds general design feedback.Needs general design feedback.[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.Questions or issues with incorporating or styling blocks in a theme.[Type] Tracking IssueTactical breakdown of efforts across the codebase and/or tied to Overview issues.Tactical breakdown of efforts across the codebase and/or tied to Overview issues.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
StatusShow more project fields
No status
What problem does this address?
Background discussion.
On the above issue, there was some consensus that there would be value in extending theme.json to allow spacing size presets to be added, which gives users a set of preset size tokens to select from as well as/or instead of just adding custom spacing values.
This blog post provides a good introduction to some of the reasons for this.
This is intended to be a top-level issue for some of the initial discussions, as well as tracking the ongoing work needed to implement this.
The block UI will need to allow people to select from the presets (e.g. padding value Medium) in addition to the "absolute value" settings (e.g typing "23px"), and also allow for theme authors to disable the option to add absolute values.
Update
Summary of discussion and suggested way forward
Todo
steps:0Done
customSpacingSizevalue fromtheme.jsonto UI and disable custom sizing whenfalse(Spacing presets: Implement disabling of custom space sizes #43216)(Mobile spacing issues #40486) are looked at as part of this