Replies: 3 comments 1 reply
-
I also want to know how to set the background opacity without knowing the color in advance, or conversely, modify the background color without knowing the opacity; it's very convenient in v3 (e.g.), but in v4 it looks like I'll have to change many lines. |
Beta Was this translation helpful? Give feedback.
-
I liked the new way of applying opacity. |
Beta Was this translation helpful? Give feedback.
-
My usecase if where the colour is unknown in the markup as it comes from authoring choices in a CMS. Authors choose background and text colours and these are inserted as variables. The point at which the author sets a colour doesn't trigger Tailwind to build. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
You deprecated bg-opacity-* and suggest instead 'use opacity modifiers like bg-black/50'
however, this is not useful and extra work if you don't know/need to know the background color in advance.
ie- if you are programatically trying to change bg-opacity independent of color
Beta Was this translation helpful? Give feedback.
All reactions