-
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
Theme.json: CSS variables are not generated for non-latin slugs in the iframed editor #49711
Comments
Hey @t-hamano is this issue assigned to anyone, if not i would live to get assigned and solve it. |
@Faizan711 |
What's the status of this issue? I would like to contribute to it. |
@abhi3315 @Faizan711, who has already been assigned to this issue, may be working on this issue. Can I reassign @abhi3315 to work on this issue if you are not already working on this issue? |
No problem @Faizan711 |
Hi @abhi3315, Can you afford to address this issue? If it is difficult, feel free to tell me 👍 |
Hey @t-hamano I tried to fix this issue but I got occupied with other things. Sorry, I forgot to mention it. Please feel free to reassign it to someone else. Thanks! |
Description
In theme.json, if the value of the slug property contains a non-latin language, all CSS variables will not be loaded into the iframe editor instance. I have confirmed that it occurs with the
settings.color.palette[].slug
property, but it may occur with all slug properties.This property has the following description in the JSON schema:
However, the user will not know why this occurs because the code editor will not show a validation error no matter what value is set.
I propose both of the following approaches to remedy this problem:
pattern
for allslug
properties to validate a value on theme.json schema, just as a pattern is specified for the name property in the block.json schemaStep-by-step reproduction instructions
In the block theme, update theme.json as follows:
When you open the site editor, the root document outputs all the CSS variables:
However, all CSS variables aren't generated in the iframe editor instance:
The browser console outputs the following error:
If all the slugs are correct, the CSS variable should output as follows:
Screenshots, screen recording, code snippet
No response
Environment info
No response
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: