Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/frontend/packages/swarm-ui/src/ui/refresh-interval/RefreshInterval.css
iris a2e8a2bda0 swarm-ui: dropdowns open a themed list of their own instead of the browser's
SelectField and the refresh-interval picker are built on a new Listbox, a
select-only combobox: a button that keeps focus and a listbox in the top
layer, so it works the same in every current browser, is not clipped by a
scrolling ancestor and shows above a modal dialog. Keys, type-ahead and
placement are pure functions with tests. required becomes aria-required, as a
button has no native form validation.
2026-10-25 17:15:04 +01:00

40 lines
1.1 KiB
CSS

/* Compact "clock icon · value · chevron" control — see RefreshInterval.tsx
for why this isn't `SelectField`'s label+bordered-control chrome. Quiet
until interacted with (no border/fill at rest), matching LinksMenu's
header-button treatment so it reads as chrome, not a form. */
.ui-refresh-picker {
position: relative;
display: inline-flex;
align-items: center;
gap: 0.35em;
min-height: 2.75em;
padding: 0 0.6em;
border: 1px solid transparent;
border-radius: 0.4em;
color: var(--muted);
font-size: 0.9em;
}
.ui-refresh-picker:hover,
.ui-refresh-picker:focus-within {
border-color: var(--border);
background: var(--bg);
color: var(--fg);
}
/* The Listbox contributes only its value and chevron: its own box is
invisible and as wide as the value, so the picker's border is the one
that shows. */
.ui-refresh-picker .ui-listbox {
width: auto;
}
.ui-refresh-picker-select.ui-form-control {
width: auto;
min-height: 2.5em;
padding: 0;
border: none;
background: none;
color: inherit;
}
.ui-refresh-picker-icon {
font-size: 0.85em;
line-height: 1;
}