textmachine/frontend/src/ui/Select.module.css

69 lines
1.4 KiB
CSS

/* The field's own look is the shared Field.module.css; here only the trigger, the popup and the
rows of the list. */
.select {
display: grid;
gap: var(--space-2);
}
.label {
color: var(--color-text-secondary);
font-size: var(--font-size-small);
}
.trigger {
display: flex;
gap: var(--space-2);
align-items: center;
justify-content: space-between;
}
.trigger[data-focus-visible],
.trigger[data-open] {
border-color: var(--color-accent);
outline: none;
}
.value {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.chevron {
flex: none;
color: var(--color-text-muted);
}
/* The popup stands on the modal surface and not on the panel one: it is opened from a window that
lies above the shell, and one step of surface is what separates them (tokens.css). */
.popover {
width: var(--trigger-width);
border: 1px solid var(--color-border);
padding: var(--space-2);
border-radius: var(--radius-control);
background-color: var(--color-elevated);
}
.list {
display: grid;
outline: none;
}
.option {
display: flex;
align-items: center;
height: var(--row-height);
padding-inline: var(--space-4);
border-radius: var(--radius-control);
color: var(--color-text);
cursor: default;
}
.option[data-hovered],
.option[data-focused] {
background-color: var(--color-raised);
}
.option[data-selected] {
background-color: var(--color-selected);
}