Add support for “intensity” modifiers on box and text shadows#17398
Merged
thecrypticace merged 15 commits intomainfrom Mar 28, 2025
Merged
Add support for “intensity” modifiers on box and text shadows#17398thecrypticace merged 15 commits intomainfrom
thecrypticace merged 15 commits intomainfrom
Conversation
594e7f9 to
a7b00c5
Compare
RobinMalfait
requested changes
Mar 27, 2025
Member
RobinMalfait
left a comment
There was a problem hiding this comment.
Left a few comments, I also wonder/wish we could only enable features like this if you use them 🤔
Contributor
Author
|
@adamwathan you cool with the name |
d542f87 to
95187e8
Compare
We don’t need to use the variable in these cases because the intensity is available directly to the utility when generated. This also helps gurantee that the relative color syntax will only be present in development and when Lighting CSS is unable to inline it
95187e8 to
393c812
Compare
28 tasks
This was referenced Apr 11, 2025
philipp-spiess
added a commit
that referenced
this pull request
Apr 11, 2025
…and `text-shadow-inherit` (#17647) Fixes #17643. This PR completely removes the `color-mix()` function for `shadow-inherit`. This does mean intensity and alpha channel support has been removed when using `shadow-inherit`[^1]. With intensity modifiers in #17398, all colors are wrapped in `color-mix()`. However, it seems `inherit` does not work as a value in `color-mix()` in Firefox or Chrome (don't have a means to test Safari). [^1]: While writing this, I noticed other color utilities allow alpha channel modifier syntax for `inherit` - do we want to look at removing those too? --------- Co-authored-by: Philipp Spiess <hello@philippspiess.com>
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.
This PR adds support for utilities like:
text-shadow-lg/25It uses relative color syntax to replace the alpha value of the shadow from your theme.
When combined with a colors:
text-shadow-lg/25 text-shadow-red-500text-shadow-lg/25 text-shadow-red-500/75The alpha values are multiplied resulting in a shadow with the color specified in
--color-red-500and alpha values of 25% and 18.75% respectively.