mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
docs(style): correctly set carbon theme
This commit is contained in:
parent
9fac25dc10
commit
196b1bac2f
6 changed files with 7 additions and 7 deletions
|
@ -16,7 +16,7 @@
|
|||
// conflict with how the iframe is displayed in the docs.
|
||||
// Instead, we want the theme to be overridden in the standalone page.
|
||||
if (["white", "g10", "g90", "g100"].includes(current_theme)) {
|
||||
document.documentElement.setAttribute("theme", current_theme);
|
||||
document.documentElement.setAttribute("data-carbon-theme", current_theme);
|
||||
document.documentElement.style.setProperty(
|
||||
"color-scheme",
|
||||
["white", "g10"].includes(current_theme) ? "light" : "dark"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue