You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
href="https://github.com/Yohn/PicoCSS/tree/main/docs/js">Vanilla JavaScript Files</a> to work the same as
231
231
the preview here. I may get a build script going to compile the javascript plugins / components later. Let
232
232
me know if this feature would help you.</p>
233
-
<hr>
234
-
<h3><details class="hide-arrow"></h3>
235
-
<p>With classes enabled, adding the <code>hide-arrow</code> class to your <code><details class="hide-arrow"></code> will hide the arrow on the <code><summary></code> tag within the accordion and dropdown components.</p>
236
-
237
233
<footer>If this fork has helped you, please <ahref="https://github.com/Yohn/PicoCSS">Like</a> this fork!
238
234
</footer>
239
235
</article>
236
+
<articleid="color-mode-toggle">
237
+
<header>
238
+
<h2>Color Mode Switch</h2>
239
+
<h6class="fw-n">Classless!</h6>
240
+
</header>
241
+
242
+
<divclass="grid" style="justify-items: center;">
243
+
<label>Example:</label>
244
+
<label>
245
+
<inputaria-label="Toggle Light or Dark Mode" name="color-mode-toggle" value="1" type="checkbox" role="switch">
246
+
</label>
247
+
</div>
248
+
<smallclass="pt-1" style="text-align: center; display: block;">Only the first switch on the page change the color mode currently. You can tap the other side on the left side abover the navbar to see the color modes change.</small>
249
+
<hrclass="m-0">
250
+
<p>You will need to include the <ahref="js/SwitchColorMode.js">SwitchColorMode.js</a> javascript at the end of your <code><body></code> tag.</p>
251
+
<p>For the switch itself, you really need to ensure the <code>name</code> and the <code>role</code> attributes are found, with the same values.</p>
252
+
<pre><codeclass="language-html"><label>
253
+
<input name="color-mode-toggle" role="switch" type="checkbox" value="1" aria-label="Toggle Light or Dark Mode">
254
+
</label></code></pre>
255
+
<p>Do not change the <code>name="color-mode-toggle"</code></p>
256
+
<p>You can assign the default color mode for new visitors by adding <code>data-theme="dark"</code> to your <code><html></code> tag. The value can be 1 of the following: <code>dark</code>, <code>light</code>, <code>auto</code>. If auto is set, it will default to the viewers prefered color mode.</p>
257
+
<p>Color modes are saved across page loads.</p>
258
+
</article>
240
259
<hr>
241
260
<articleid="tables">
242
261
<header>
@@ -933,7 +952,7 @@ <h2>Rows</h2>
933
952
<p>
934
953
<code>.row</code> has a max width set to the viewport of your <code>xl</code> viewport (1300px by default)
<p>With classes enabled, adding the <code>hide-arrow</code> class to your <code><details class="hide-arrow"></code> will hide the arrow on the <code><summary></code> tag within the accordion and dropdown components.</p>
1206
+
<hr>
1185
1207
<detailsname="example-accordion">
1186
1208
<summary>Accordion 1</summary>
1187
1209
<p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque urna diam, tincidunt nec porta
0 commit comments