-
Notifications
You must be signed in to change notification settings - Fork 543
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add object-value CSS shorthand transforms (#1194)
- Loading branch information
1 parent
17582c9
commit 4225d78
Showing
13 changed files
with
1,172 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
'style-dictionary': minor | ||
--- | ||
|
||
Added the following transforms for CSS, and added them to the `scss`, `css` and `less` transformGroups: | ||
|
||
- `fontFamily/css` -> wraps font names with spaces in `'` quotes | ||
- `cubicBezier/css` -> array value, put inside `cubic-bezier()` CSS function | ||
- `strokeStyle/css/shorthand` -> object value, transform to CSS shorthand | ||
- `border/css/shorthand` -> object value, transform to CSS shorthand | ||
- `typography/css/shorthand` -> object value, transform to CSS shorthand | ||
- `transition/css/shorthand` -> object value, transform to CSS shorthand | ||
- `shadow/css/shorthand` -> object value (or array of objects), transform to CSS shorthand | ||
|
||
The main intention here is to ensure that Style Dictionary is compliant with [DTCG draft specification](https://design-tokens.github.io/community-group/format/) out of the box with regards to exporting to CSS, where object-value tokens are not supported without transforming them to shorthands (or expanding them, which is a different feature that was added in `4.0.0-prerelease.27`). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.