[v4] Consider darkening text colors #14712
Unanswered
khinshankhan
asked this question in
Help
Replies: 1 comment
-
|
The issue with I've proposed a different syntax that addresses this: #14827 (comment) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
With v4, using a class like
text-accent-11/60results in css likecolor-mix(in srgb, var(--color-accent-11) 60%, transparent). This is a great improvement from v3 as it allows for any color type rather than using a hack to specify alpha.However, what if I want to darken text? There doesn't seem to be an easy way to generate something like
color-mix(in srgb, var(--color-accent-11) 60%, #fff).My initial thought was maybe on "opacities greater than 100" instead of using transparent use black but in hindsight, black isn't quite the opposite of transparent and it doesn't seem intuitive. Also, there may be cases for wanting custom colors for the mix instead. What if we used a css variable here so that
text-accent-11/60generatescolor-mix(in srgb, var(--color-accent-11) 60%, --tw-color-mixin)and by default that'stransparentbut can be customized via another class egmix-text-[color]?Interested in other thoughts. May be related to #11321
Beta Was this translation helpful? Give feedback.
All reactions