From 194f4c6b328186e98002b9890cd28131efcaf5ca Mon Sep 17 00:00:00 2001 From: Jordan Scales Date: Mon, 20 Apr 2020 14:52:33 -0400 Subject: [PATCH] checkboxes and some tweaks to the docs --- docs/docs.css | 19 +++++++++++++++---- docs/index.html | 31 ++++++++++++++++++++++++++++++- style.css | 12 ++++++++++-- 3 files changed, 55 insertions(+), 7 deletions(-) diff --git a/docs/docs.css b/docs/docs.css index 226555f..43df38c 100644 --- a/docs/docs.css +++ b/docs/docs.css @@ -7,6 +7,7 @@ body { main { width: 65rem; margin-left: 240px; + margin-bottom: 60px; } aside { @@ -56,7 +57,8 @@ h2 { h3 { font-size: 2rem; margin-top: 20px; - width: 120px; + display: block; + flex: 0 0 120px; } p { @@ -69,11 +71,15 @@ p { } .component > div { - margin: 12px 0 0 32px; + margin-left: 32px; padding-left: 32px; border-left: 1px solid var(--button-shadow); } +.component:not(:first) > div { + padding-top: 12px; +} + blockquote { margin: 0 0 20px; padding: 20px; @@ -85,10 +91,15 @@ blockquote footer { } .example { - margin: 12px 12px 24px; + margin: 0 12px 24px; } -details { +.example:first { + margin-top: 12px; +} + +details, +summary { margin: 12px 0; } diff --git a/docs/index.html b/docs/index.html index 1a41e2b..42640de 100644 --- a/docs/index.html +++ b/docs/index.html @@ -123,7 +123,6 @@
-
Show code
<button>I am focused</button>
@@ -131,6 +130,36 @@
+ +
+

Checkbox

+
+
+ A check boxrepresents an independent or non-exclusive choice. +
— Microsoft Windows User Experience, 8.3
+
+ +

+ Checkboxes are represented with a sunken panel, populated with a "check" icon when + selected, next to a label indicating the choice. +

+ +

+ Note: You must include a corresponding label after + your checkbox, using the <label> element with a for attribute + pointed at the id of your input. +

+ +
+ + + +
+ Show code +
<input type="checkbox" id="example1">
+<label for="example1">This is a checkbox</label>
+
+
diff --git a/style.css b/style.css index 2c04876..ab79d0c 100644 --- a/style.css +++ b/style.css @@ -191,7 +191,7 @@ legend { } label { - display: flex; + display: inline-flex; align-items: center; } @@ -410,7 +410,7 @@ ul.treeview ul > li:last-child::after { background: var(--button-highlight); } -pre code { +pre { display: block; background: var(--button-highlight); box-shadow: var(--border-field); @@ -419,6 +419,14 @@ pre code { font-family: monospace; } +code { + font-family: monospace; +} + +summary:focus { + outline: 1px dotted #000000; +} + ::-webkit-scrollbar { width: 16px; }