Replies: 5 comments
-
How will this work with multiple shadows? The box shadow syntax is not limited to one effect, this is a list of effects: boxShadow: {
default: '0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)',
}, |
Beta Was this translation helpful? Give feedback.
-
It will not, I guess. At least not in clean way. |
Beta Was this translation helpful? Give feedback.
-
0 1px 3px 0 rgba(var(--shadow-color), 0.1) rgba(var(--shadow-color), 0.06); Something like this? |
Beta Was this translation helpful? Give feedback.
-
That is actually stupidly simple, @lemcii! 😅 |
Beta Was this translation helpful? Give feedback.
-
I have tested the default Tailwind palette (excluding I am also realizing that it does not make sense to have 9 shadow shades per color. Using one shade per color should be sufficient. For This CSS could be used to define custom box shadow opacities per color: .shadow-lg {
--shadow-color: 0, 0, 0;
--shadow-opacity: 0.1;
box-shadow: 0 10px 15px -3px rgba(var(--shadow-color), var(--shadow-opacity)),
0 4px 6px -2px rgba(var(--shadow-color), calc(var(--shadow-opacity) * 0.5));
} |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Instead of only black shadows, it would be nice to add some color to our shadows. This issue applies to
box-shadow
and in the future perhaps alsotext-shadow
.Here's a code example (using abritrary values):
Unfortunately this would a breaking change in v1(.2), because the different shadow size would require the
shadow
to be added.Beta Was this translation helpful? Give feedback.
All reactions