-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Add drop-shadow-*
color support
#17434
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
Conversation
20476ae
to
b9f294e
Compare
b9f294e
to
a4872d9
Compare
a4872d9
to
8cb6505
Compare
@adamwathan Would be good to get your eyes on the implementation to see if there's anything you'd prefer to change about this. They work mostly the same as the existing text-shadow, inset-shadow, and shadow utilities. |
`drop-shadow(${replaceShadowColors( | ||
v, | ||
alpha, | ||
(color) => `var(--tw-drop-shadow-color, ${color})`, | ||
)})`, |
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 think the API changed here because this is passing 3 values instead of 2
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.
Ah I think it's because I pressed the update button (because of conflicts in the CHANGELOG.md file)
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.
This PR adds support for two things:
drop-shadow-{color}
utilities which can be used to control the filder drop shadow colordrop-shadow-*/{alpha}
utilities which can be used to control the intensity of the drop shadowNote that drop-shadow-* utilities without a modifier use variables from your theme.
If you opt into using drop shadow colors or drop-shadow "intensity" utilities we will inline these values into your CSS when using a drop shadow color or drop shadow intensity utility and as such can't be changed by changing the theme variables on a per-element/tree basis.