center the colour picker

This commit is contained in:
Lewis Dale committed 2023-09-26 20:53:42 +01:00
1 parent f213a499e2
commit 74ddce603a
2 files changed
+44 -21

No files matched your search

+40 -21
View File
@@ -1,7 +1,15 @@
header > * {
flex-grow: 1;
}
.color-scheme {
border: 0;
padding: 0;
display: flex;
gap: var(--space-size-xs);
flex-grow: 1;
justify-content: center;
justify-self: flex-end;
legend {
position:absolute;
@@ -13,30 +21,41 @@
clip:rect(0 0 0 0);
}
label:has(:not(:checked)) {
color: var(--color-subtle);
}
label {
cursor: pointer;
label:has(:focus-visible) {
outline: 1px solid var(--color-primary);
outline-offset: 2px;
}
&:has(:not(:checked)) {
color: var(--color-disabled);
}
label:has([name="color-scheme"])::before {
font-family: "font awesome 6 free";
font-style: normal;
font-variant: normal;
text-rendering: auto;
font-weight: 900;
-webkit-font-smoothing: antialiased;
font-size: var(--text-size-s);
}
&:has(:focus-visible) {
outline: 1px solid var(--color-primary);
outline-offset: 2px;
}
label:has([name="color-scheme"][value="dark"])::before {
content: "\f186";
}
&:has([name="color-scheme"]) {
label:has([name="color-scheme"][value="light"])::before {
content: "\f185";
&::before {
font-family: "font awesome 6 free";
font-style: normal;
font-variant: normal;
text-rendering: auto;
font-weight: 900;
-webkit-font-smoothing: antialiased;
font-size: var(--text-size-s);
}
&:has([value="dark"]) {
&::before {
content: "\f186";
}
}
&:has([value="light"]) {
&::before {
content: "\f185";
}
}
}
}
}