-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Global Styles: Add textShadow style support #73320
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
base: trunk
Are you sure you want to change the base?
Conversation
| // Reset the text shadow from the global styles. | ||
| text-shadow: none; |
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.
|
Size Change: +29 B (0%) Total Size: 2.49 MB
ℹ️ View Unchanged
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
aaronrobertshaw
left a comment
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 for all the work on this @t-hamano 👍
This might just be me but splitting up the changes for the block support here, makes it much harder to actually confirm that all the places required have been updated.
Reviewing the changes as they are currently though there are a couple of minor issues:
- Need to update: docs/reference-guides/theme-json-reference/styles-versions.md
- Text shadow should be added to the
VALID_SETTINGSin the theme.json class too - Needs to update docs/reference-guides/theme-json-reference/theme-json-living.md for settings after update above
- Once setting for text shadow has been added we also need a default setting value in
lib/theme.json - Also, it looks like the style engine's PHP typography config hasn't been updated here or in #71419
|
@aaronrobertshaw Thanks for the review!
This is the main reason why I split the tasks. Also, since this PR is solely focused on style, I purposely left out the settings. That said, if addressing everything at once is easier, I'm happy to prioritize #71419 👍 |




text-shadowoption support in Typography Panel #71419What?
This PR allows
text-shadowCSS styles to be defined in theme.json.Why? How?
Looking at #47904, the Text Shadow support seems to be a feature requested by many users.
However, to fully implement this, we need to discuss the following at least:
This PR is the first small feature improvement, allowing us to simply define
text-shadowunder thestyles.typography.Testing Instructions
For example, use a theme.json like the one below and make sure it works correctly in all scenarios:
{ "$schema": "../../schemas/json/theme.json", "version": 3, "settings": { "appearanceTools": true, "layout": { "contentSize": "840px", "wideSize": "1100px" } }, "styles": { "typography": { "textShadow": "1px 1px 2px red, 0 0 1em blue, 0 0 0.2em blue;" }, "blocks": { "core/paragraph": { "typography": { "textShadow": "1px 1px 2px red, 0 0 1em red, 0 0 0.2em red;" } } }, "elements": { "link": { ":hover": { "typography": { "textShadow": "none" } } } } } }Screenshots or screencast