You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe your issue
Referring to the reproduction, when a base color is set for the from, via and to gradient stops and then changing only the via value in dark mode, the to property gets reset back to the transparent version of the via color.
On further investigation it looks like it is this PR that changed the behavior to fix a safari bug. Using version 2.0~3.0 has the expected behavior for my use case (override only via-<color> in dark mode)
Hey! Yeah so this is by design at the moment — if we didn't do this then there would be no way to change the via-* color with a variant like dark: and fade to transparent in a way that works in Safari < 15.4.
This same thing happens when you change the from-* color as well:
...and in a bunch of other similar places in Tailwind, for example text-lg leading-5 dark:text-xl would lose the custom line-height when dark mode is enabled.
Solution in all of these cases is just to re-specify the thing that is being overridden color, so dark:to-blue-500 in this case — sort of annoying I get it but better to have to do that and still make fading to transparent possible than not have to re-specify and have no way to fade to transparent.
What version of Tailwind CSS are you using?
For example: v3.2.7
Reproduction URL
https://play.tailwindcss.com/HkVZEWjuc1?layout=horizontal
Describe your issue
Referring to the reproduction, when a base color is set for the
from
,via
andto
gradient stops and then changing only thevia
value in dark mode, theto
property gets reset back to the transparent version of thevia
color.This is the current output CSS:
However, I would expect the following output:
Happy to contribute if I could get some guidance on where to look.
The text was updated successfully, but these errors were encountered: