jukebox
All repositories: gitoria
19.3 KB
// theme/theme.hl — THE WORLDAPI THEME: how WorldAPI makes the black/white components of components.hybriel.worldapi.org// look for itself. A styles file (hl:web): an app inherits it from its own styles.hl and sets its accent and type colours://// inherit './theme/theme.hl'// import { var } from 'hl:web/css'// import { purple, yellow } from './shared/tokens.hl'// colorAccent = var(purple)// colorType1 = var(yellow)//// What is in here, in this order:// 1. layout tokens and the type-colour slots (the palette and the semantic roles are shared/tokens.hl)// 2. plain HTML elements: text, links, buttons, fields, foldables, drop zones, tables, pills// 3. the components of components.hybriel.worldapi.org, themed WITHOUT forking them: every rule repeats the component's// own selector with `html ` in front, so it wins over the component's Style (which comes later in the one stylesheet)// and never emits the same selector twice (hl:web refuses that)// The shells (header, sidebar, content-first, list-first, three-pane) carry their own Style in theme/shell/*.hl.//// Design rules (docs/design-rules.md): borderless — a border only where it means something (foldables, drop zones,// focus); no boxed cards, no grey frames; colours only through the named tokens; titles white; mobile first, wider// layouts in `@media (min-width: 60rem)` (the one breakpoint of the theme, also used by theme/shell/*.hl).import { var } from 'hl:web/css'import { yellow, greenDark, purple, blueDark, orange, blueLight, colorBackground, colorBackgroundSunken, colorSurface, colorBorder, colorText, colorTextStrong, colorTextMuted, colorSuccess, colorWarning, colorDanger, colorAccent, colorAccentText } from '../shared/tokens.hl'// ---- 1. tokens -------------------------------------------------------------------------------------------------// the type colours: an app names what each slot means (tracker: 1 Movie, 2 Series, 3 Show, 4 Genre, 5 Person) and may// point a slot at another palette colour in its styles.hl (`colorType1 = var(yellow)`)colorType1 = var(yellow)colorType2 = var(greenDark)colorType3 = var(purple)colorType4 = var(blueDark)colorType5 = var(orange)colorType6 = var(blueLight)// the layout: the centred content column (header contents end flush with it), the side gutter, the header height, the// sidebar and list-pane widths of the shellslayoutColumn = var('72rem')layoutGutter = var('1rem')layoutHeader = var('3.25rem')layoutSidebar = var('16rem')layoutList = var('24rem')// the tap size: every button, icon button, link in a menu or list, tab, crumb and field is at least this tall and wide (44 px, the// minimum touch target); mobile first — only the buttons and menu links of the desktop (min-width 60rem) go denser, on purposelayoutTap = var('2.75rem')// the corner radii — exactly two (docs/design-rules.md "Corner radius"): radiusSmall for every small item (buttons, pills,// fields, tags, menu items, chips, day cells), radiusLarge for everything else that is rounded (panels, modals, popovers,// dropdowns, foldables, tiles/posters); '50%' only for round things (avatars, the check circle). check-theme flags any otherradiusSmall = var('5px')radiusLarge = var('10px')// ---- 2. plain elements -----------------------------------------------------------------------------------------// Keep the whole selector for the selector list.'*,*::before,*::after' { boxSizing = 'border-box' }body {margin = '0'minHeight = '100dvh'font = '16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif'color = colorTextbackground = colorBackgroundoverflowWrap = 'anywhere'}// Keep the whole selector for the pseudo-element.'::selection' {color = colorAccentTextbackground = colorAccent}// Keep the attribute-only selector; no bare form exists.'[hidden]' { display = 'none !important' }h1 {margin = '0 0 1rem'fontSize = '1.6rem'lineHeight = '1.25'color = colorTextStrong}h2 {margin = '1.5rem 0 .6rem'fontSize = '1.25rem'lineHeight = '1.3'color = colorTextStrong}h3 {margin = '1.25rem 0 .5rem'fontSize = '1.05rem'lineHeight = '1.3'color = colorTextStrong}h4 {margin = '1rem 0 .4rem'fontSize = '1rem'color = colorTextStrong}p { margin = '0 0 1rem' }strong { color = colorTextStrong }small { fontSize = '.85rem' }// Keep the class-only selector; no bare class form exists in a styles file.'.muted' { color = colorTextMuted }'p.empty' {color = colorTextMutedfontStyle = 'italic'}// Keep the class-only selector; no bare class form exists in a styles file.'.visually-hidden' {position = 'absolute'width = '1px'height = '1px'margin = '-1px'padding = '0'overflow = 'hidden'clip = 'rect(0 0 0 0)'whiteSpace = 'nowrap'border = '0'}ul {margin = '0 0 1rem'paddingLeft = '1.25rem'}ol {margin = '0 0 1rem'paddingLeft = '1.5rem'}li { margin = '.15rem 0' }hr {height = '1px'margin = '1.5rem 0'border = '0'background = colorSurface}img {maxWidth = '100%'height = 'auto'}a {color = colorAccenttextDecoration = 'none'textUnderlineOffset = '.2em'hover { textDecoration = 'underline' }}// Keep the whole selector for the selector list.'li > a:first-child,.links a,.row > a,.crumbs a' {display = 'inline-flex'alignItems = 'center'minHeight = layoutTap}// Keep the standalone pseudo-class; there is no enclosing element.':focus-visible' {outline = '2px solid ' + colorAccentoutlineOffset = '2px'}// Keep the whole selector for the selector list.'code,kbd,samp' {padding = '.05rem .3rem'font = '.9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace'background = colorSurfaceborderRadius = radiusSmall}pre {margin = '0 0 1rem'padding = '.75rem 1rem'overflow = 'auto'font = '.9rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace'background = colorBackgroundSunkenborderRadius = radiusLargecode {padding = '0'background = 'transparent'}}// Keep the whole selector for the selector list.'button,.button' {display = 'inline-flex'alignItems = 'center'justifyContent = 'center'gap = '.4rem'minWidth = layoutTapminHeight = layoutTappadding = '.4rem .9rem'font = 'inherit'fontWeight = '600'lineHeight = '1.2'color = colorTexttextDecoration = 'none'background = 'transparent'border = '0'borderRadius = radiusSmallcursor = 'pointer'}// Keep the whole selector for the selector list.'button:hover,.button:hover' {textDecoration = 'none'background = colorSurface}// Keep the whole selector for the selector list.'button.primary,.button.primary,button[type="submit"]' {color = colorAccentTextbackground = colorAccent}// Keep the whole selector for the selector list.'button.primary:hover,.button.primary:hover,button[type="submit"]:hover' {background = colorAccentfilter = 'brightness(1.1)'}// Keep the whole selector for the selector list.'button.danger,.button.danger' { color = colorDanger }@media {minWidth = '60rem'// Keep the whole selector for the selector list.'button,.button' { minHeight = '2.25rem' }}button {disabled {opacity = '.45'cursor = 'default'filter = 'none'}}// Keep the whole selector for the selector list.'button svg,.button svg' {flex = 'none'width = '1.25rem'height = '1.25rem'}label {display = 'block'marginBottom = '.25rem'fontWeight = '600'color = colorTextStrong}// Keep the whole selector for the selector list.'input,select,textarea' {maxWidth = '100%'minHeight = layoutTappadding = '.5rem .7rem'font = 'inherit'fontSize = '1rem'color = colorTextbackground = colorBackgroundSunkenborder = '0'borderRadius = radiusSmall}// Keep the whole selector for the selector list.'input:focus,select:focus,textarea:focus' {outline = '2px solid ' + colorAccentoutlineOffset = '0'}// Keep the whole selector for the selector list.'input[aria-invalid="true"],textarea[aria-invalid="true"]' {outline = '2px solid ' + colorDangeroutlineOffset = '0'}// Keep the whole selector for the selector list.'input[type="checkbox"],input[type="radio"]' {width = '1.25rem'height = '1.25rem'minHeight = '0'padding = '0'accentColor = colorAccent}// Keep the whole selector for the selector list.'label:has(> input[type="checkbox"]),label:has(> input[type="radio"])' {display = 'flex'alignItems = 'center'gap = '.6rem'minHeight = layoutTap}// Keep the whole selector for the selector list.'input::placeholder,textarea::placeholder' { color = colorTextMuted }textarea {width = '100%'minHeight = '6rem'resize = 'vertical'}fieldset {margin = '0 0 1rem'padding = '0'border = '0'}legend {padding = '0'marginBottom = '.5rem'fontWeight = '600'color = colorTextStrong}form {p { margin = '0 0 1rem' }}progress { accentColor = colorAccent }details {margin = '0 0 .75rem'border = '1px solid ' + colorBorder // functional: foldable boundaryborderRadius = radiusLarge'> summary' {'+ *' { marginTop = '.75rem' }}}summary {display = 'block'minHeight = layoutTappadding = '.6rem .9rem'fontWeight = '600'color = colorTextStrongcursor = 'pointer'hover { background = colorSurface }}'details[open]' {'> summary' { borderBottom = '1px solid ' + colorBorder }}// Keep the whole selector for the functional condition.'details > :not(summary)' {marginLeft = '.9rem'marginRight = '.9rem'}// Keep the whole selector for the functional condition.'details > :last-child:not(summary)' { marginBottom = '.75rem' }// Keep the selector list; its dashed border marks the functional drop zone.'drop-zone,.drop-zone' {display = 'block'padding = '1.25rem'textAlign = 'center'color = colorTextMutedborder = '2px dashed ' + colorBorder // functional: drop-zone boundaryborderRadius = radiusLarge}// Keep the whole selector for the selector list.'drop-zone.over,.drop-zone.over' {color = colorTextborderColor = colorAccent // functional: active drop-zone boundarybackground = colorSurface}table {width = '100%'margin = '0 0 1rem'borderCollapse = 'collapse'}th {padding = '.4rem .6rem'fontSize = '.85rem'fontWeight = '600'textAlign = 'left'color = colorTextMuted}td {padding = '.5rem .6rem'verticalAlign = 'top'}// Keep the whole selector for the selector list.'td,th' { overflowWrap = 'break-word' }tbody {'tr:nth-child(odd)' { background = colorBackgroundSunken }tr {hover { background = colorSurface }}}// Keep the class-only selector; no bare class form exists in a styles file.'.type-1' { color = colorType1 }// Keep the class-only selector; no bare class form exists in a styles file.'.type-2' { color = colorType2 }// Keep the class-only selector; no bare class form exists in a styles file.'.type-3' { color = colorType3 }// Keep the class-only selector; no bare class form exists in a styles file.'.type-4' { color = colorType4 }// Keep the class-only selector; no bare class form exists in a styles file.'.type-5' { color = colorType5 }// Keep the class-only selector; no bare class form exists in a styles file.'.type-6' { color = colorType6 }// Keep the class-only selector; no bare class form exists in a styles file.'.success' { color = colorSuccess }// Keep the class-only selector; no bare class form exists in a styles file.'.warning' { color = colorWarning }// Keep the class-only selector; no bare class form exists in a styles file.'.danger' { color = colorDanger }// Keep the class-only selector; no bare class form exists in a styles file.'.pill' {display = 'inline-block'padding = '.1rem .55rem'fontSize = '.8rem'fontWeight = '700'lineHeight = '1.5'color = colorAccentTextbackground = colorAccentborderRadius = radiusSmallwhiteSpace = 'nowrap'}// Keep the class-only selector; no bare class form exists in a styles file.'.pill.type-1' {color = colorAccentTextbackground = colorType1}// Keep the class-only selector; no bare class form exists in a styles file.'.pill.type-2' {color = colorAccentTextbackground = colorType2}// Keep the class-only selector; no bare class form exists in a styles file.'.pill.type-3' {color = colorAccentTextbackground = colorType3}// Keep the class-only selector; no bare class form exists in a styles file.'.pill.type-4' {color = colorAccentTextbackground = colorType4}// Keep the class-only selector; no bare class form exists in a styles file.'.pill.type-5' {color = colorAccentTextbackground = colorType5}// Keep the class-only selector; no bare class form exists in a styles file.'.pill.type-6' {color = colorAccentTextbackground = colorType6}// Keep the class-only selector; no bare class form exists in a styles file.'.pill.success' {color = colorAccentTextbackground = colorSuccess}// Keep the class-only selector; no bare class form exists in a styles file.'.pill.warning' {color = colorAccentTextbackground = colorWarning}// Keep the class-only selector; no bare class form exists in a styles file.'.pill.danger' {color = colorAccentTextbackground = colorDanger}// Keep the class-only selector; no bare class form exists in a styles file.'.pill.quiet' {color = colorTextbackground = colorSurface}// ---- 3. the components of components.hybriel.worldapi.org --------------------------------------------------------// Plain html declarations share this single root; repeating html overwrites them on day35.html {colorScheme = 'dark'scrollbarColor = colorBorder + ' transparent'pagination {button {border = '0'borderRadius = radiusSmallminWidth = layoutTap}'li.current' {button { border = '0' }}}modalDialog {'> dialog' {background = colorSurfaceborder = '0'borderRadius = radiusLargeboxShadow = '0 1rem 3rem ' + colorBackgroundSunken}header { borderBottom = '0' }modalBody {'> footer' {background = colorSurfaceborderTop = '0'}}button {borderRadius = radiusSmallhover { background = colorBackground }}}monthView {ol { gap = '.25rem' }button {border = '0'borderRadius = radiusSmall}}'#month-days' {li {border = '0'borderRadius = radiusLarge}}datePicker {input {border = '0'borderRadius = radiusSmall}'input[aria-invalid="true"]' {outline = '2px solid ' + colorDangeroutlineOffset = '-2px'}monthView {background = colorSurfaceborder = '0'borderRadius = radiusLargeboxShadow = '0 .75rem 2rem ' + colorBackgroundSunkenol { gap = '.2rem' }}button {border = '0'borderRadius = radiusSmall}'ol.days' {li {background = colorBackgroundborder = '0'borderRadius = radiusSmall}'li.outside' { background = 'transparent' }'li.selected' { background = colorAccent }}}rangePicker {input {border = '0'borderRadius = radiusSmall}'input[aria-invalid="true"]' {outline = '2px solid ' + colorDangeroutlineOffset = '-2px'}monthView {background = colorSurfaceborder = '0'borderRadius = radiusLargeboxShadow = '0 .75rem 2rem ' + colorBackgroundSunkenol { gap = '.2rem' }}button {border = '0'borderRadius = radiusSmall}'ol.days' {li {background = colorBackgroundborder = '0'borderRadius = radiusSmall}'li.outside' { background = 'transparent' }'li.selected' { background = colorAccent }'li.between' {background = colorBackgroundSunkenoutline = '0'time { color = colorAccent }}}}fileUpload {dropZone { borderRadius = radiusLarge }'label.choose' {display = 'inline-flex'alignItems = 'center'minHeight = layoutTapfontWeight = '600'border = '0'borderRadius = radiusSmallhover {color = colorTextStrongfilter = 'brightness(1.15)'}}}filesUpload {dropZone { borderRadius = radiusLarge }pickArea { borderRadius = radiusLarge }'label.camera' { borderRadius = radiusSmall }'label.choose' {display = 'inline-flex'alignItems = 'center'minHeight = layoutTapfontWeight = '600'border = '0'borderRadius = radiusSmallhover {color = colorTextStrongfilter = 'brightness(1.15)'}}}mdEditor {border = '0'borderRadius = radiusLargenav {borderBottom = '0'borderRadius = radiusLarge + ' ' + radiusLarge + ' 0 0'button {minWidth = layoutTapminHeight = layoutTapborderRadius = radiusSmall}}@media {minWidth = '60.01rem'nav {button { minWidth = '2.5rem' }}}'ul.files' { borderBottom = '0' }linkForm {borderBottom = '0'background = colorSurfaceinput {border = '0'borderRadius = radiusSmall}button {border = '0'borderRadius = radiusSmall}}article {img { borderRadius = radiusLarge }code { borderRadius = radiusSmall }pre {border = '0'borderRadius = radiusLarge}}footer {borderTop = '0'button {border = '0'borderRadius = radiusSmall}}}commentsBlock {@media {maxWidth = '59.99rem''details.comment-history' {summary {display = 'inline-flex'alignItems = 'center'justifyContent = 'center'minWidth = layoutTapminHeight = layoutTapmargin = '-1rem -.2rem'}}}}codeEditor {border = '0'borderRadius = radiusLargecodeGutter { borderRight = '0' }}mediaPlayer {video {borderRadius = radiusLargebackground = colorBackgroundSunken}// Keep the class-only selector; no bare class form exists in a styles file.'.mp-cover' {img {borderRadius = radiusLargebackground = colorSurface}}mpSeek {// Keep the class-only selector; no bare class form exists in a styles file.'.mp-track' {background = colorBackgroundSunkenborderRadius = radiusSmall}// Keep the class-only selector; no bare class form exists in a styles file.'.mp-buffered' {background = colorBorderopacity = '.6'}// Keep the class-only selector; no bare class form exists in a styles file.'.mp-played' { background = colorAccent }// Keep the class-only selector; no bare class form exists in a styles file.'.mp-thumb' { background = colorAccent }}mpButtons {button {borderRadius = radiusSmallhover { background = colorSurface }}// Keep the class-only selector; no bare class form exists in a styles file.'.mp-times' { color = colorTextMuted }}'ol.mp-queue' {button { borderRadius = radiusSmall }'li.current' {button {color = colorAccentbackground = colorSurface}// Keep the class-only selector; no bare class form exists in a styles file.'.mp-q-dur' { color = colorAccent }}// Keep the class-only selector; no bare class form exists in a styles file.'.mp-q-dur' { color = colorTextMuted }}}}// Keep the whole selector for the selector list.'html files-upload ul.files img.thumb, html files-upload ul.files .kind, html files-upload button.remove' { borderRadius = radiusSmall }// Keep the selector list; the functional borders separate the user's table cells.'html md-editor article th,html md-editor article td' { border = '1px solid ' + colorBorder } // functional: table cell grid// Keep the whole selector for the selector list.'h1 code,h2 code,h3 code,html md-editor article h1 code,html md-editor article h2 code,html md-editor article h3 code' {fontSize = '.65em'overflowWrap = 'anywhere'}// Keep the whole selector for the selector list.'html md-editor td a,html md-editor th a' {display = 'inline-flex'alignItems = 'center'minHeight = layoutTap}
Branches
Latest commits
- 204fc828Merge branch 'day72' into mainJukebox
- 33072bb5|||PR Record day72 gates and Chrome proofmre
- 95f2cd73|||PR Use typed parent methods for screen playback and local server facesmre
- 6422a020Sync media-player at 51c3818mre
- b582ba1cVendor complete Hybriel day72 plugin setmre
- 02dccbc9Merge branch 'records-1119' into mainJukebox
- a39e1c23|||PR Records: missions 013-015, reconnect fix livemre
- fc7db075Merge branch 'reconnect-retry' into mainJukebox
- ac6f4c6fL2: plain declaration for a in pickedNextmre
- 2f335086Review round 2: only an explicit queue pick drops pend (not the automatic advance); jb23 records every source changemre
- 3eb6695fReview fixes: action generation, queue pick clears pend, Previous/Next retry the decided request, typed handlersmre
- 7a53c0c2|||PR A tap lost to a dead socket plays after reconnect (mission 015)mre
- 1f0cd77bMerge branch 'records-day41' into mainJukebox
- 67be229f|||PR Records: day41 live (PR #4), mission 012, statusmre
- 0bb027daconductor: caramboleyo is the user, not owner/creatorApollo
- 04f5d9d5Merge branch 'day41' into mainJukebox
- 8ed6da45|||PR README: media-player pin df9e7dfmre
- d5d45fc3|||PR media-player df9e7df (repeat-one fix), sync pin and SOURCEmre
- 89cdabb1Vendor Hybriel day41 (57054d9e): plugin dirs, set .somre
- 1fecd6a7Merge branch 'records-day39' into mainJukebox