-
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
Custom property output by spacing sizes is incorrect for slugs containing numbers #44349
Labels
[Package] Style Engine
/packages/style-engine
[Type] Bug
An existing feature does not function as intended
Comments
fabiankaegy
added
[Type] Bug
An existing feature does not function as intended
[Package] Style Engine
/packages/style-engine
labels
Sep 22, 2022
Just a note for any theme developers that might be impacted by this: Manually adding the "spacingSizes": [
{
"slug": "s",
"size": "5px",
"name": "S"
},
{
"slug": "m",
"size": "10px",
"name": "M"
},
{
"slug": "l",
"size": "15px",
"name": "L"
},
{
"slug": "xl",
"size": "30px",
"name": "XL"
},
{
"slug": "2-xl",
"size": "50px",
"name": "2XL"
},
{
"slug": "3-xl",
"size": "85px",
"name": "3XL"
}
] |
cc/ @ramonjd b/c Style Engine 😊 |
github-actions
bot
added
the
[Status] In Progress
Tracking issues with work in progress
label
Sep 23, 2022
Thanks for reporting this! It's a JS fix. I've added the fix and test coverage over in #44406 I've also added the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Package] Style Engine
/packages/style-engine
[Type] Bug
An existing feature does not function as intended
Description
Using the new
spacingSizes
property intheme.json
I noticed that the custom property that gets set as an inline style from the style engine are incorrect if theslug
contains a number.My spacing sizes look as follows:
They produce the custom properties:
But the inline styles that get generated in the editor look like this:
The Inline styles are missing the additional
-
after any number in the slugStep-by-step reproduction instructions
spacingScale
to yourtheme.json
fileScreenshots, screen recording, code snippet
Environment info
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
The text was updated successfully, but these errors were encountered: