tailwindlabs / tailwindcss.com

The Tailwind CSS documentation website.
https://tailwindcss.com
3.25k stars 1.72k forks source link

Add clarification about preserving the same `to-*` color stop #1850

Closed simonswiss closed 1 month ago

simonswiss commented 1 month ago

This PR adds a short sentence outlining the fact that to-* color stops need to be redefined when a variant modifier is used on the from-* color.

Explaining why this happens — the intelligent transparency fade calculation (RGB with 0 alpha) — is probably "too much info", but I thought it was useful to just mention the behaviour.

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tailwindcss-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 27, 2024 3:38pm
adamwathan commented 1 month ago

Thanks! Made a couple tweaks and added an example 👍

This does work in v4 without doing this which is nice:

https://play.tailwindcss.com/iZ5qPyJxhh