Replies: 1 comment 1 reply
-
Interesting idea, thank you for sharing 💯 Currently, this is outside of our scope, but let's keep this discussion going. I'm curious about what others think too. To give you some context: The Right now the best option that comes to mind is to use single shadow tokens, then compose them at the usage level: const { styled } = createCss({
theme: {
shadows: {
s1: "3px 3px",
s2: "-1em 0 0.4em"
}
}
});
const Button = styled("button", {
$$shadowColor: "red",
boxShadow: "$s1 $$shadowColor, $s2 $$shadowColor"
}); |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
It could be useful to be able to overwrite certain parts of a pre-defined theme value at the instance level.
A good example is a box-shadow. Currently, you can leave off the color value and fill it in later with a locally-scoped variable:
But, as far as I know, this falls apart when combining multiple shadows into a single value:
Can't do this:
A proposed solution: Locally-scoped theme override tokens
Here is the basic idea:
Beta Was this translation helpful? Give feedback.
All reactions