, .
+ * `.link`: any other .
+ * `.tab`: tab-styled .
+ */
+.button,
+.link,
+.tab {
+ cursor: pointer;
+ text-decoration: none;
+ white-space: nowrap;
+}
+.button,
+.tab {
+ align-items: center;
+ color: var(--color-gray);
+ display: flex;
+ fill: var(--color-gray);
+ font-weight: bold;
+}
+.button {
+ border: 1px solid var(--color-gray);
+ border-radius: 0.25em;
+ font-size: 0.8rem;
+ padding: 0.6em 0.5em;
+ width: fit-content;
+}
+[name=cancel],
+.auxiliary {
+ border-color: var(--color-border-gray);
+ color: var(--color-nav-gray);
+ fill: var(--color-nav-gray);
+}
+.button > svg,
+.tab > svg {
+ height: 1.4em;
+ width: 1.4em;
+}
+.button > svg:not(:last-child),
+.tab > svg:not(:last-child) {
+ margin-right: 0.2em;
+}
+.button:focus-visible,
+.tab:focus-visible,
+.tab:hover {
+ background-color: var(--color-focus-gray);
+}
+.button:hover {
+ background-color: var(--color-blue);
+ border-color: var(--color-blue);
+ color: white;
+ fill: white;
+}
+.dangerous:hover {
+ background-color: var(--color-red);
+ border-color: var(--color-red);
+}
+/* TODO: move normal, non-button links ( :hover/:focus) styling here (i.e.
+ * page-wide, top-level) and remove from `table.items` - as the style should be
+ * same everywhere. */
input[type=text]:read-only,
textarea:read-only {
border: none;
@@ -219,8 +223,8 @@ textarea:read-only {
}
-/* NOTE: collapse gaps around empty rows (`topside`) once possible
- * with grid-collapse property and remove alternative grid-template
+/* NOTE: collapse gaps around empty rows (`topside`) once possible with
+ * `grid-collapse` property and remove alternative `grid-template-areas`.
* https://github.com/w3c/csswg-drafts/issues/5813 */
body {
display: grid;
@@ -253,18 +257,14 @@ header {
margin-inline-start: 4%;
}
.navigation > .tab {
- border-bottom: solid 2px var(--color-nav-gray);
+ border-bottom: 2px solid var(--color-nav-gray);
flex: 1;
font-size: 1rem;
justify-content: center;
padding-block: 0.4em;
}
-.navigation > .tab:hover,
-.navigation > .tab:focus-visible {
- background-color: var(--color-focus-gray);
-}
.navigation > .tab.active {
- border-bottom: solid 4px var(--color-blue);
+ border-bottom: 4px solid var(--color-blue);
color: var(--color-blue);
fill: var(--color-blue);
}
@@ -296,7 +296,7 @@ header {
#flashes {
display: grid;
- gap: 0.2em;
+ row-gap: 0.4em;
grid-template-columns: 1fr auto auto auto 1fr;
left: 0;
pointer-events: none;
@@ -312,48 +312,42 @@ header {
display: grid;
grid-column: 2/5;
grid-template-columns: subgrid;
+ line-height: 2.2em;
pointer-events: auto;
}
-.flash.alert:before {
- content: url('pictograms/alert-outline.svg');
+.flash:before {
+ filter: invert();
height: 1.4em;
margin: 0 0.5em;
width: 1.4em;
}
+.flash.alert:before {
+ content: url('pictograms/alert-outline.svg');
+}
.flash.alert {
border-color: var(--color-red);
background-color: var(--color-red);
}
.flash.notice:before {
content: url('pictograms/check-circle-outline.svg');
- height: 1.4em;
- margin: 0 0.5em;
- width: 1.4em;
}
.flash.notice {
border-color: var(--color-blue);
background-color: var(--color-blue);
}
-.flash > div {
- grid-column: 2;
-}
-/* NOTE: currently flash button inherits some unnecessary styles from generic
- * button. */
-.flash > button {
- border: none;
- color: inherit;
+.flash svg {
cursor: pointer;
- font-size: 1.4em;
- font-weight: bold;
- grid-column: 3;
+ fill: white;
+ height: 2.2em;
opacity: 0.6;
- padding: 0.2em 0.4em;
+ padding: 0.4em 0.5em;
+ width: 2.4em;
}
-.flash > button:hover {
+.flash svg:hover {
opacity: 1;
}
-/* TODO: Hover over invalid should work like in measurements (thin vs thick border) */
+
.labeled-form {
align-items: center;
display: grid;
@@ -370,7 +364,7 @@ header {
.labeled-form label.required {
font-weight: bold;
}
-/* Don't style `label.error + input` if case already covered by input:invalid */
+/* Don't style `label.error + input` if case already covered by `input:invalid`. */
.labeled-form label.error {
color: var(--color-red);
}
@@ -384,15 +378,23 @@ header {
}
.labeled-form input[type=submit] {
font-size: 1rem;
- margin: 1.5em auto 0 auto;
+ margin: 1em auto 0 auto;
padding: 0.75em;
}
+.labeled-form .auxiliary {
+ grid-column: 3;
+ /* If more buttons are needed, `grid-row` can be replaced with
+ * `reading-flow: grid-columns` to ensure proper [tabindex] order. */
+ grid-row: 1;
+ height: 100%;
+ padding-block: 0;
+}
-/* TODO: remove .items class (?) and make 'form table' work properly */
+/* TODO: remove `.items` class (?) and make `form table` work properly. */
table.items {
border-spacing: 0;
- border: solid 1px var(--color-border-gray);
+ border: 1px solid var(--color-border-gray);
border-radius: 0.25em;
font-size: 0.85rem;
text-align: left;
@@ -415,7 +417,7 @@ table.items th,
table.items td {
padding-inline: 1em 0;
}
-/* For to fill completely, we use an ::after pseudoelement. */
+/* For to fill completely, we use an `::after` pseudoelement. */
table.items td.link {
padding: 0;
position: relative;
@@ -445,7 +447,7 @@ table.items td:last-child {
padding-inline-end: 0.1em;
}
table.items td {
- border-top: solid 1px var(--color-border-gray);
+ border-top: 1px solid var(--color-border-gray);
height: 2.4em;
padding-block: 0.1em;
}
@@ -464,7 +466,7 @@ table.items tr.dropzone::after {
content: '';
inset: 1px 0 0 0;
position: absolute;
- outline: dashed 2px var(--color-blue);
+ outline: 2px dashed var(--color-blue);
outline-offset: -1px;
z-index: var(--z-index-table-row-outline);
}
@@ -475,8 +477,8 @@ table.items tr.form td {
vertical-align: top;
}
-/* TODO: replace :hover:focus-visible combos with proper LOVE stye order */
-/* TODO: Update table styling: simplify selectors, deduplicate, remove non-font rem. */
+/* TODO: replace `:hover:focus-visible` combos with proper LOVE style order. */
+/* TODO: update table styling: simplify selectors, deduplicate, remove non-font rem. */
table.items td.link a:hover,
table.items td.link a:focus-visible,
table.items td.link a:hover:focus-visible {
@@ -514,9 +516,7 @@ table.items td.svg {
table.items td.number {
text-align: right;
}
-table.items .button,
-table.items button,
-table.items input[type=submit] {
+table.items .button {
font-weight: normal;
height: 100%;
padding: 0.4em;
@@ -526,30 +526,26 @@ table.items select,
table.items textarea {
padding-block: 0.375em;
}
-/* TODO: find a way (layers?) to style inputs differently while making sure
- * hover works properly without using :not(:hover) selectors here. */
-table.items .button:not(:hover),
-table.items button:not(:hover),
-table.items input:not(:hover),
-table.items select:not(:hover),
-table.items textarea:not(:hover) {
+
+table input,
+table select,
+table summary,
+table textarea {
border-color: var(--color-border-gray);
}
-table.items .button:not(:hover),
-table.items button:not(:hover),
-table.items input[type=submit]:not(:hover),
-table.items select:not(:hover) {
+table select {
color: var(--color-table-gray);
}
-table.items select:focus-within,
-table.items select:focus-visible {
+table select:hover,
+table select:focus-within,
+table select:focus-visible {
color: black;
}
-form a[name=cancel] {
+table .button {
border-color: var(--color-border-gray);
- color: var(--color-nav-gray);
- fill: var(--color-nav-gray);
+ color: var(--color-table-gray);
}
+
form table.items {
border: none;
}
@@ -561,6 +557,9 @@ form table.items td {
form table.items td:first-child {
color: inherit;
}
+form table select {
+ color: black;
+}
.centered {
@@ -620,7 +619,7 @@ summary:has(.button) {
padding-inline-end: 0;
}
summary .button {
- border: solid 1px var(--color-border-gray);
+ border: 1px solid var(--color-border-gray);
border-radius: inherit;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
@@ -636,10 +635,10 @@ details[open] summary::before {
summary::marker {
padding-left: 0.25em;
}
-/* NOTE: use details[open]::details-content once widely available */
+/* NOTE: use `details[open]::details-content` once widely available. */
details[open] ul {
background: white;
- border: solid 1px var(--color-border-gray);
+ border: 1px solid var(--color-border-gray);
border-radius: 0.25em;
box-shadow: 1px 1px 3px var(--color-border-gray);
margin: -1px 0 0 0;
@@ -661,3 +660,10 @@ li input[type=checkbox] {
li::marker {
content: '';
}
+/*
+ * TODO:
+ * * disable containing disabled checkbox: `label:has(input[disabled])`,
+ * * disabled label styling,
+ * * focused label styling (currently only checkbox has focus),
+ * * disabled checkbox blue square focus removal.
+ * */