-
-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Tracking]: Box Shadow improvements #281
Comments
Hey, importing shadows into effect styles is a very important topic for us as well. |
As I wasn't really able to find anything, are you aware of any plans the W3C DTCG have on a syntax for box shadows? I'd love to build that around current drafts. |
The array of shadows would be just what I need. I see that also working very well with references to other tokens of individual shadows. |
Hey, @six7 I don't think this is specified yet at all. However some notes from my side:
A possible syntax could be: "dark": {
"value": [{
"x": 5,
"y": 5,
"spread": 3,
"color": "rgba(0, 0, 0, 0.5)",
"blur": 5,
"type": "dropShadow",
},
{
"x": 5,
"y": 5,
"spread": 3,
"color": "#00000033", // hex 8
"blur": 5,
"type": "innerShadow", // or inset or whatever you think is best
}],
"type": "boxShadow"
} |
This looks perfect. 😍 The color could also be RGB or hex8 to include opacity, correct? |
Yes, exactly! It would allow you to insert rgb(a), hex(8) or hsl(a) |
Closing this as it was shipped |
Box Shadows aren't properly supported yet, we should change that.
A couple of issue that are open:
Currently we store box shadows as an object:
This doesn't really allow us to do something like multiple shadows.
Instead, I would propose to create boxShadows with an array syntax:
[5px 5px 5px 3px rgba(0, 0, 0, 0.5), 5px 5px 5px 3px rgba(0, 0, 0, 0.5)]
which would allow us to have multiple shadows. We could still pick up the values in the UI and possibly provide a nicer experience.Also, this should allow us to import and export shadow styles more easily.
The text was updated successfully, but these errors were encountered: