[community-group] Pull Request: Proposal: changes to $shadow

drwpow has just submitted a new pull request for https://github.com/design-tokens/community-group:

== Proposal: changes to $shadow ==
## Summary

This proposes the following changes to `$type: shadow` tokens:

- Allows arrays for `$value`
- Adds `inset` (boolean) property

## Reasoning

This PR proposes that the following discussions be resolved like so:

- #100: ✅ **Accepted** (all proposals that I saw)

## Pros

- Adds layered shadow support ([example](https://shadows.brumm.af/)) without breaking existing shadow tokens
- Adds support for inset shadows, also without breaking backwards compatibility

## Cons

- Arrays vs non-arrays adds a minor bit of tooling annoyance, but nothing significant

## Alternatives 

- We could just enforce “always arrays,” but IMO that’s not necessary to put that burden on the people writing JSON. The spec allows for other “syntactic sugar” and this seems like a good <abbr title="Quality of Life">QoL</abbr> addition
- We could make `inset` required, at the expense of breaking backward compatibility
- Instead of `"inset": [boolean]`, we could have something like `"position": "inner"` (string enum), but I can’t think of any other value this would be. Seems like designing for something no one has asked for.

## Notes

- Other token types such as gradients and cubic béziers already have arrays for values, so this doesn’t introduce inconsistencies in the design

See https://github.com/design-tokens/community-group/pull/246


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 17 August 2024 21:37:27 UTC