-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Backport: Bug fixes in theme json with fluid typography and spacing presets #3362
Backport: Bug fixes in theme json with fluid typography and spacing presets #3362
Conversation
Thanks @glendaviesnz This was an oversight on my part in the main Typgraphy PR that got merged #3237 |
Thank you @glendaviesnz 💟 It's looking good. Should the spacing slug value be a string? E.g., 2023 theme.json"typography": {
"dropCap": false,
"fluid": true,
"fontFamilies": [
...
"spacing": {
"spacingScale": {
"steps": 0
},
"spacingSizes": [
{
"size": "clamp(1.5rem, 5vw, 2rem)",
"slug": "30",
"name": "30"
}, Export before"typography": {
"dropCap": false,
"fontFamilies": [
....
"spacing": {
"spacingScale": [],
"spacingSizes": [
{
"name": "30",
"size": "clamp(1.5rem, 5vw, 2rem)",
"slug": 30
}, After"typography": {
"dropCap": false,
"fluid": true,
"fontFamilies": [
...
"spacing": {
"spacingScale": {
"steps": 0
},
"spacingSizes": [
{
"name": "30",
"size": "clamp(1.5rem, 5vw, 2rem)",
"slug": 30
},
|
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.
Approving since the spacing slug number will be cast to a string when imported/injested.
The other two changes affect functionality and should be fixed.
I was looking to merge this, but I want to make sure this comment by @tellthemachines is addressed in the final PR: |
After looking at the code and the comments, it appears the concerns are addressed. Prepping a merge commit to core. |
Merged into core in https://core.trac.wordpress.org/changeset/54360. |
The new fluid typography setting is missing from the theme.json valid values in 6.1, which causes the value to be dropped from theme exports from the editor as reported here.
Trac ticket: https://core.trac.wordpress.org/ticket/56684