-
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
Move styles.blockgap to settings.spacing.blockGap #34452
Comments
styles
instead of settings -> spacing
?
The block gap is a style that is actually added to the generate stylesheet. The settings are just config values that are available in the editor. |
#33991 is a PR that allows you to define a specific block style for a given block. (so still a style). And now adding block gap to The |
Thanks for the clarity there, but why wouldn't #33991 be |
I think that's good feedback, you could ask there. I believe it started as "customBlockGap" and was renamed. @andrewserong |
for naming convention, I think it'd be best to keep things in alignment with whatever standard that ends up being - whether we go more verbose with customSettingName (customBlockGap) or settingName (blockGap), and the location placements to be consistent where other related elements are in place, otherwise it becomes a nightmare to dig through documentation on where you messed up a setting placement. |
One small clarification is that customColor and customGradient.... make sense because these mean: folks are allowed to use "custom colors" or not. and "colors", "gradients" are about allowing and defining preset colors and gradients. In Blog Gap, there's no difference there, there's only custom block gap, there's no presets (at least at the moment, and I'm not sure if we'd have presets) |
In this model, by customBlockGap being |
Right now, it's still named just |
I'd largely agree that customColor and customGradient makes sense because that explains explicitly the setting enabled. |
Thanks for the ping (and for starting the discussion, Rich, much appreciated)! Yes, the setting was renamed for consistency with the plan proposed in the theme.json v2 issue that suggests removing the For where the setting versus styling sits, I think it's worth keeping them separate between
Very happy for feedback on that, though, since I'm likely biased from tinkering with #33991 ! 🙂 |
I'm unsure what the logic is behind having
blockGap
withinstyles
in theme.json, instead ofsettings.spacing.blockGap
.The value itself is used throughout the editor — instead of applied directory to the
body
tag, as the other styles that are currently added tostyles
are. Seems a bit confusing/harder to employ, when spacing configuration aspects of the theme.json file separated as such.I propose having a true/false boolean as
settings.spacing.customBlockGap
which would declare whether or not the UI should allow for changing of a block's blockGap value (when blocks have this ability - soon).And a separate
settings.spacing.blockGap
entry to indicate what the block gap should be for the theme (say30px
or so) replacing the currentstyles.blockGap
.How it is today:
and
The front-end
The generated CSS property is not actually being applied here, as the other settings are:
Suggested
Moving the blockGap setting in theme.json to be with the other spacing settings of a theme.
The text was updated successfully, but these errors were encountered: