Add shared horizontal and vertical checkbox groups

This commit is contained in:
SantaSpeen committed 2026-12-01 13:49:13 +03:00
1 parent aece8e59cd
commit 36f526aa02
12 files changed
+135 -1

No files matched your search

+86
View File
@@ -2842,3 +2842,89 @@ body[data-concept="dock"].dock-open
.choice-pill:has(input:disabled) > input {
cursor: not-allowed;
}
/* One shared surface for related choices; inner options have no individual bubbles. */
.choice-fieldset {
border: 0;
padding: 0;
margin: 20px 0 0;
min-width: 0;
}
.choice-fieldset legend {
padding: 0;
margin-bottom: 10px;
font-size: 13px;
color: var(--color-muted);
}
.choice-group {
display: inline-flex;
align-items: stretch;
max-width: 100%;
border: 1px solid var(--color-border);
border-radius: 999px;
background: var(--color-surface);
overflow: hidden;
vertical-align: top;
}
.choice-group-option {
position: relative;
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
min-height: 44px;
padding: 10px 12px;
font-size: 14px;
line-height: 20px;
cursor: pointer;
}
.choice-group-option + .choice-group-option::before {
content: "";
position: absolute;
inset: 0 auto 0 0;
border-left: 1px solid var(--color-border);
pointer-events: none;
}
.choice-group-option > :is(input[type="checkbox"], input[type="radio"]) {
display: block;
width: 18px;
height: 18px;
flex-shrink: 0;
margin: 0;
}
.choice-group-option > span {
min-width: 0;
line-height: 20px;
overflow-wrap: anywhere;
}
.choice-group-option:hover {
background: var(--color-row-hover);
}
.choice-group-option:has(input:checked) {
background: var(--color-row-active);
color: var(--color-accent);
}
.choice-group-option:has(input:focus-visible) {
background: var(--color-row-hover);
}
.choice-group-option > input:focus-visible {
outline: none;
}
.choice-group-option:has(input:disabled),
.choice-group-option > input:disabled {
cursor: not-allowed;
}
.choice-group-option:has(input:disabled) {
opacity: 0.5;
}
.choice-group--vertical {
display: flex;
flex-direction: column;
width: min(280px, 100%);
border-radius: 18px;
}
.choice-group--vertical > .choice-group-option + .choice-group-option::before {
inset: 0 0 auto;
border-left: 0;
border-top: 1px solid var(--color-border);
}