/* Combobox: the suggestions popup of , under the server's search form, as full-width rows of poster, title and year. One sheet, two uses: the element adopts it as is (define's scoped: false), and dist/combobox.css is the same rules raw, for the page to . So every selector starts at the tag: that is its scope (inside @scope (tag) the tag itself would not match). The form itself is the page's to style; the sheet only gives the field and the button their 44px. Each option is the server's
  • around a link; the sheet lays the link out as a row and sizes an in it as a small poster. State is attributes: [data-open] and [data-loading] on the host, [data-active] (and aria-selected="true") on the active option, [hidden] on the popup. Theming: every value is a --pebble-combobox-* custom property with a fallback, light and dark defaults chosen by prefers-color-scheme; page tokens (--accent) inherit in. */ pebble-combobox { --_ink: var(--pebble-combobox-ink, #1a1a1a); --_muted: var(--pebble-combobox-muted, #5c5f66); --_surface: var(--pebble-combobox-surface, #ffffff); --_border: var(--pebble-combobox-border, #d0d0d0); --_active: var(--pebble-combobox-active, #e7f0fb); --_shadow: var(--pebble-combobox-shadow, 0 8px 24px rgba(0, 0, 0, 0.18)); --_focus: var(--pebble-combobox-focus, var(--accent, #1971c2)); position: relative; display: block; } @media (prefers-color-scheme: dark) { pebble-combobox { --_ink: var(--pebble-combobox-ink, #f1f3f5); --_muted: var(--pebble-combobox-muted, #adb5bd); --_surface: var(--pebble-combobox-surface, #1f1f1f); --_border: var(--pebble-combobox-border, #495057); --_active: var(--pebble-combobox-active, #1c3a5e); --_shadow: var(--pebble-combobox-shadow, 0 8px 24px rgba(0, 0, 0, 0.6)); } } pebble-combobox input:not([type="hidden"]), pebble-combobox button { min-height: var(--pebble-combobox-size, 44px); box-sizing: border-box; } pebble-combobox .popup { position: absolute; top: calc(100% + var(--pebble-combobox-offset, 0.25rem)); inset-inline: 0; z-index: var(--pebble-combobox-z-index, 50); max-height: var(--pebble-combobox-max-height, min(60vh, 26rem)); overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--_border); border-radius: var(--pebble-combobox-radius, 0.5rem); background: var(--_surface); color: var(--_ink); box-shadow: var(--_shadow); &[hidden] { display: none; } } pebble-combobox .listbox { margin: 0; padding: 0.25rem 0; list-style: none; & > li { margin: 0; padding: 0; } & > li > a, & > li:not(:has(a)) { display: flex; align-items: center; gap: 0.75rem; box-sizing: border-box; min-height: var(--pebble-combobox-size, 44px); padding: 0.375rem 0.75rem; color: inherit; text-decoration: none; } & img { flex: none; width: var(--pebble-combobox-poster-width, 2.5rem); aspect-ratio: 2 / 3; height: auto; object-fit: cover; border-radius: 0.25rem; background: var(--_border); } & small, & time { color: var(--_muted); } & > li[data-active], & > li:hover { background: var(--_active); } & > li[data-active] { outline: 2px solid var(--_focus); outline-offset: -2px; } } pebble-combobox[data-loading] input:not([type="hidden"]) { cursor: progress; }