-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use layers for token entry files
Wrapping tokens into a layer allows consuming projects to easily define the cascade order of the tokens, no matter at what position they get imported.
- Loading branch information
Showing
3 changed files
with
21 additions
and
8 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,5 @@ | ||
--- | ||
'@swisspost/design-system-styles': patch | ||
--- | ||
|
||
Wrapped new token only entry files in a CSS layer called 'design-system'. The two files affected are 'post-tokens-external.scss' and 'post-tokens-internal.scss' as well as their compiled CSS counterparts. |
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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
@use './tokens/modes'; | ||
@use './tokens/device'; | ||
@use './tokens/external'; | ||
@use './tokens/post-theme'; | ||
@use 'sass:meta'; | ||
|
||
@layer design-system { | ||
@include meta.load-css('./tokens/modes'); | ||
@include meta.load-css('./tokens/device'); | ||
@include meta.load-css('./tokens/external'); | ||
@include meta.load-css('./tokens/post-theme'); | ||
} |
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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
@use './tokens/modes'; | ||
@use './tokens/device'; | ||
@use './tokens/internal'; | ||
@use './tokens/post-theme'; | ||
@use 'sass:meta'; | ||
|
||
@layer design-system { | ||
@include meta.load-css('./tokens/modes'); | ||
@include meta.load-css('./tokens/device'); | ||
@include meta.load-css('./tokens/internal'); | ||
@include meta.load-css('./tokens/post-theme'); | ||
} |