Repository navigation
Feat: Add theme.json support for textShadow - #77745
Closed
USERSATOSHI wants to merge 2 commits into
Closed
USERSATOSHI wants to merge 2 commits into
USERSATOSHI wants to merge 2 commits into
Conversation
Contributor
Author
|
Duplicate of #73320 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What?
Part of #47904
Related with #71419
This PR adds theme.json support for the
textShadowtypography field.It updates the schema, theme.json defaults, PHP theme.json processing, and the style engine so
settings.typography.textShadowandstyles.typography.textShadoware recognized and can generatetext-shadowCSS.Why?
The larger
textShadoweffort was split into smaller steps.The first step is making theme.json understand the field end to end. Without this, themes cannot declare
textShadowintheme.json, and Gutenberg cannot consistently validate and generate styles for it.Landing the theme.json layer first reduces scope and gives us a stable base for the later UI work.
How?
This PR adds
textShadowsupport in the theme.json pipeline by updating:theme.jsonschema to allow the setting and style fieldsettings.typography.textShadowWP_Theme_JSON_Gutenbergmetadata and allowlists so the field is accepted and mapped to thetext-shadowCSS propertytextShadowTesting Instructions
{ "$schema": "../../schemas/json/theme.json", "version": 3, "settings": { "appearanceTools": true, "layout": { "contentSize": "840px", "wideSize": "1100px" }, "typography": { "textShadow": true } }, "styles": { "elements": { "heading": { "typography": { "textShadow": "2px 2px 4px rgba(0,0,0,0.35)" } } }, "blocks": { "core/paragraph": { "typography": { "textShadow": "1px 1px 0 #ff0000" } } } } }text-shadowis generated from the theme.json values.Screenshots or screencast
Use of AI Tools
Github Copilot used to generate PR description and test examples.