diff --git a/docsite/index.html b/docsite/index.html index a98575e2..5c733fe3 100644 --- a/docsite/index.html +++ b/docsite/index.html @@ -1713,7 +1713,7 @@
+
+ @import "https://unpkg.com/open-props/theme.light.switch.min.css";
+ @import "https://unpkg.com/open-props/theme.dark.switch.min.css";
+
+
+ The Open Props normalize.css has light and dark built in, but it only changes with the media query / operating system. If you want users to be able to change this, you'll need Open Props switch imports. These have the same theme values from normalize, but scoped to selectors.
+ +Light Selectors: .light
| .light-theme |
data-theme="light"
Dark Selectors: .dark
| .dark-theme
| data-theme="dark"
This allows you to apply a light or dark theme to the page or a portion of the page using the selectors imported.
+See it in action: here
+When you need to control the appearance of a specific section, use any of the selectors from the switch imports, like .dark
or .light
, and apply them to HTML elements.
Try it here
+
+
+ @import "https://unpkg.com/open-props/theme.light.switch.min.css";
+ @import "https://unpkg.com/open-props/theme.dark.switch.min.css";
+
+ /* classes toggle the adaptive props */
+ .dark, .light {
+ color: var(--text-1);
+ background: var(--surface-1);
+ }
+
+
+