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 @@
NPM Imported Usage Sample
- Color Theming 101 + Color 101: Themes
@@ -1921,6 +1921,50 @@
Typography
+ +
+ Color 201: Normalize Theme Switch + +
+
+

1) Normalize Theme Switch

+
+              
+                @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

+
+ +
+

2) Section theme

+

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);
+                  }
+              
+            
+
+
+
diff --git a/src/extra/normalize.src.css b/src/extra/normalize.src.css index 87510183..e7035d83 100644 --- a/src/extra/normalize.src.css +++ b/src/extra/normalize.src.css @@ -138,7 +138,7 @@ border-radius: var(--radius-2); } -:where(textarea) { +:where(textarea) { resize: block; field-sizing: content; min-inline-size: var(--size-content-1);