This repository was archived by the owner on Feb 17, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 363
Update theme.json to follow latest spec #2659
Merged
jffng
merged 10 commits into
trunk
from
seedlet-blocks/update/theme-json-to-latest-spec
Oct 28, 2020
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b9e7d8f
Update theme.json to follow latest spec
kjellr 96d2124
Add custom gradients
kjellr ab61a66
Merge branch 'master' into seedlet-blocks/update/theme-json-to-latest…
kjellr 432747a
Revise font size variables.
kjellr baeb9bf
Remove XXL and XXXL font styles.
kjellr 52a7bbb
Use correct format to declare preset values.
kjellr e6aa981
Merge branch 'trunk' into seedlet-blocks/update/theme-json-to-latest-…
jffng ae1baee
Adds a name key value pair to the fontSizes.
jffng 3393f96
Merge branch 'trunk' into seedlet-blocks/update/theme-json-to-latest-…
kjellr a99c913
Update gradients to use hex values.
kjellr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,103 @@ | ||
{ | ||
"global": { | ||
"presets": { | ||
"font-size": [ | ||
{ | ||
"slug": "tiny", | ||
"value": "14px" | ||
}, | ||
{ | ||
"slug": "small", | ||
"value": "16px" | ||
}, | ||
{ | ||
"slug": "medium", | ||
"value": "18px" | ||
}, | ||
{ | ||
"slug": "large", | ||
"value": "24px" | ||
}, | ||
{ | ||
"slug": "extra-large", | ||
"value": "28px" | ||
}, | ||
{ | ||
"slug": "huge", | ||
"value": "32px" | ||
}, | ||
{ | ||
"slug": "gigantic", | ||
"value": "48px" | ||
"settings": { | ||
"color": { | ||
"gradients": [ | ||
{ | ||
"slug": "hard-diagonal", | ||
"gradient": "linear-gradient(to bottom right, #3C8067 49.9%, #FAFBF6 50%)" | ||
}, | ||
{ | ||
"slug": "hard-diagonal-inverted", | ||
"gradient": "linear-gradient(to top left, #3C8067 49.9%, #FAFBF6 50%)" | ||
}, | ||
{ | ||
"slug": "hard-horizontal", | ||
"gradient": "linear-gradient(to bottom, #3C8067 50%, #FAFBF6 50%)" | ||
}, | ||
{ | ||
"slug": "hard-horizontal-inverted", | ||
"gradient": "linear-gradient(to top, #3C8067 50%, #FAFBF6 50%)" | ||
}, | ||
{ | ||
"slug": "diagonal", | ||
"gradient": "linear-gradient(to bottom right, #3C8067, #FAFBF6)" | ||
}, | ||
{ | ||
"slug": "diagonal-inverted", | ||
"gradient": "linear-gradient(to top left, #3C8067, #FAFBF6)" | ||
}, | ||
{ | ||
"slug": "horizontal", | ||
"gradient": "linear-gradient(to bottom, #3C8067, #FAFBF6)" | ||
}, | ||
{ | ||
"slug": "horizontal-inverted", | ||
"gradient": "linear-gradient(to top, #3C8067, #FAFBF6)" | ||
}, | ||
{ | ||
"slug": "stripe", | ||
"gradient": "linear-gradient(to bottom, transparent 20%, #3C8067 20%, #3C8067 80%, transparent 80%)" | ||
} | ||
], | ||
"palette": [ | ||
{ | ||
"slug": "background", | ||
"color": "#FFFFFF" | ||
}, | ||
{ | ||
"slug": "foreground", | ||
"color": "#333333" | ||
}, | ||
{ | ||
"slug": "primary", | ||
"color": "#000000" | ||
}, | ||
{ | ||
"slug": "secondary", | ||
"color": "#3C8067" | ||
}, | ||
{ | ||
"slug": "tertiary", | ||
"color": "#FAFBF6" | ||
} | ||
] | ||
}, | ||
"typography": { | ||
"customFontSize": true, | ||
"customLineHeight": true, | ||
"fontSizes": [ | ||
{ | ||
"name": "Tiny", | ||
"slug": "tiny", | ||
"size": 14 | ||
}, | ||
{ | ||
"name": "Small", | ||
"slug": "small", | ||
"size": 16 | ||
}, | ||
{ | ||
"name": "Normal", | ||
"slug": "normal", | ||
"size": 18 | ||
}, | ||
{ | ||
"name": "Large", | ||
"slug": "large", | ||
"size": 24 | ||
}, | ||
{ | ||
"name": "Huge", | ||
"slug": "huge", | ||
"size": 28 | ||
} | ||
], | ||
"spacing": { | ||
"customPadding": true, | ||
"units": [ "px", "em", "rem", "vh", "vw" ] | ||
} | ||
], | ||
"color": [ | ||
{ | ||
"slug": "background", | ||
"value": "#FFFFFF" | ||
}, | ||
{ | ||
"slug": "foreground", | ||
"value": "#333333" | ||
}, | ||
{ | ||
"slug": "primary", | ||
"value": "#000000" | ||
}, | ||
{ | ||
"slug": "secondary", | ||
"value": "#3C8067" | ||
}, | ||
{ | ||
"slug": "tertiary", | ||
"value": "#FAFBF6" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I noticed that the gradient previews are broken when we supply the gradients via the theme.json:
Other than that, this PR looks good to me.
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.
Ouch, this is a bug that needs fixing. It's a bit convoluted and can take a few days of back/forth, so I'd like to offer an alternative to unblock this PR: use raw values to define the gradient presets instead of pointing to the color preset CSS variables.
I'll ping here when the fix lands in Gutenberg.
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.
Actually, I've created an issue to better track this. You can subscribe over there!
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 @nosolosw! I'll keep an eye on that. @jffng would you mind re-testing? I think this should be all set now.