-
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(styles): fixes playground (#4119)
Adds more specific token selects and fixes the preview, also adds compatibility for the `sass-embedded` package. --------- Co-authored-by: Alizé Debray <[email protected]>
- Loading branch information
1 parent
4c46ac8
commit b6a6e7a
Showing
4 changed files
with
65 additions
and
24 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
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 @@ | ||
// Change tokens | ||
document.getElementById('channel-select').addEventListener('change', e => { | ||
document.getElementById('channel').setAttribute('href', `src/tokens/_${e.target.value}.scss`); | ||
}); | ||
|
||
document.getElementById('theme-select').addEventListener('change', e => { | ||
document.getElementById('theme').setAttribute('href', `src/tokens/_${e.target.value}-theme.scss`); | ||
document | ||
.getElementById('palettes') | ||
.setAttribute('href', `src/palettes/${e.target.value}-palettes.scss`); | ||
}); | ||
|
||
document.getElementById('scheme-select').addEventListener('change', e => { | ||
document.body.setAttribute('data-color-scheme', e.target.value); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export default { | ||
// https://www.oddbird.net/2024/08/14/sass-compiler/ | ||
css: { | ||
preprocessorOptions: { | ||
scss: { | ||
api: 'modern-compiler', | ||
}, | ||
}, | ||
}, | ||
}; |