-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Style engine: add handling of spacing presets #41700
Conversation
@ramonjd @andrewserong - have moved the shared css var code into a shared method. I will add some tests before I take it out of draft. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Glen, that's looking cleaner now with the additional function 👍
Just left a question about naming of the placeholder for the CSS var, but this is looking close to me!
04427f3
to
bd2c53d
Compare
5d4abcc
to
e73f921
Compare
98b67fd
to
85476df
Compare
…sert additional options
…add additional values between core defaults
dd77d90
to
e23e954
Compare
5df63cc
to
724852d
Compare
eef6401
to
392b6a4
Compare
68a229a
to
eef6401
Compare
Replaced by #41990 |
What?
Adds handling of conversion of spacing preset values to css vars to style engine
Why?
#41527 adds the spacing presets to theme.json, as the first part of implementing standardised design tokens for spacing as detailed in #39371
How?
Extends the existing preset var handling added for the processing of color presets.
Testing Instructions
var:preset|space|20
values intovar(--wp--preset--spacing--20);
in the block stylesN.B. The frontend styles markup in this PR is not an indication of the final marking for spacing presets. The final implementation may use utility classes as noted in #39371, but the fact that we are generating these styles dynamically on the frontend means we can modify the output relatively easily as we go.
Screenshots or screencast