calendar
All repositories: gitoria
4.7 KB
// styles.hl — ALL of the app's CSS, served as /__hl/app.css. The month view carries its own Style (components/month-view): markup is domain// tags, this file lays them out. Tokens: shared/tokens.hl (verbatim copy of loreana worldapi-tokens/tokens.hl);// the site sets only its accent. In a styles file a bare name is a TAG (camelCase → kebab), a quoted name is a// selector written verbatim. MOBILE FIRST: every rule is the phone's; the min-width block adds the wide layout.import { var } from 'hl:web/css'import { blueLight, colorText, colorBackground, colorTextStrong, colorTextMuted, colorBackgroundSunken, colorSurface, colorBorder, colorAccentText, colorDanger } from './shared/tokens.hl'colorAccent = var(blueLight) // the app's accent: the only token it sets'*,*::before,*::after' { boxSizing = 'border-box' }html { colorScheme = 'dark' }body { margin = '0' font = '16px/1.5 system-ui, sans-serif' color = colorText background = colorBackground }a { color = colorAccent textDecoration = 'none' }'a:hover' { textDecoration = 'underline' }h1 { margin = '0 0 1rem' fontSize = '1.3rem' lineHeight = '1.3' color = colorTextStrong }h2 { margin = '0' fontSize = '1.1rem' color = colorTextStrong }'.muted' { color = colorTextMuted }button { font = 'inherit' fontWeight = '600' padding = '.4rem .9rem' color = colorAccentText background = colorAccent border = '0' borderRadius = '.4rem' cursor = 'pointer' }'button:hover' { filter = 'brightness(1.1)' }'button.quiet' { color = colorText background = 'transparent' border = '1px solid ' + colorBorder }'button.quiet:hover' { background = colorSurface filter = 'none' }applicationHeader { position = 'sticky' top = '0' zIndex = '5' display = 'flex' flexWrap = 'wrap' alignItems = 'baseline' gap = '.2rem 1rem' padding = '.6rem 1rem' background = colorBackgroundSunken borderBottom = '1px solid ' + colorBorder }'application-header .brand' { fontWeight = '800' fontSize = '1.15rem' color = colorAccent }main { display = 'block' maxWidth = '60rem' margin = '0 auto' padding = '1rem' }// ---- login (top right of the header) -------------------------------------------------------------userBox { display = 'flex' alignItems = 'center' gap = '.5rem' marginLeft = 'auto' }'a.button' { display = 'inline-block' padding = '.35rem .8rem' fontWeight = '600' color = colorAccentText background = colorAccent borderRadius = '.4rem' }'a.button:hover' { textDecoration = 'none' filter = 'brightness(1.1)' }identSelector { '--ident-accent' = colorAccent '--ident-accent-text' = colorAccentText '--ident-background' = colorSurface '--ident-border' = colorBorder '--ident-font' = '600 .9rem/1.4 system-ui, sans-serif' }'ident-selector::part(button)' { padding = '.35rem .8rem' }'ident-selector::part(status)' { padding = '.35rem .8rem' }'.message' { color = colorDanger }'.message.banner' { margin = '0' padding = '.5rem 1rem' background = colorBackgroundSunken }'p.message:empty' { display = 'none' }// ---- the events on the days and the editor -------------------------------------------------------dayEvents { display = 'grid' gap = '.15rem' marginTop = '.2rem' textAlign = 'left' }'button.unused' { display = 'none' }'button.more' { padding = '.05rem .3rem' fontSize = '.75rem' fontWeight = '500' lineHeight = '1.3' textAlign = 'left' color = colorTextMuted background = 'transparent' border = '0' }'button.event' { padding = '.05rem .3rem' fontSize = '.75rem' fontWeight = '500' lineHeight = '1.3' textAlign = 'left' whiteSpace = 'nowrap' overflow = 'hidden' textOverflow = 'ellipsis' borderRadius = '.25rem' }eventEditor { position = 'fixed' inset = '0' zIndex = '10' display = 'grid' placeItems = 'center' padding = '1rem' background = 'rgba(0, 0, 0, .55)' }'event-editor.closed' { display = 'none' }'event-editor form' { display = 'grid' gap = '.7rem' width = '100%' maxWidth = '28rem' maxHeight = '100%' overflowY = 'auto' padding = '1rem' background = colorSurface border = '1px solid ' + colorBorder borderRadius = '.5rem' }'event-editor label' { display = 'grid' gap = '.2rem' fontSize = '.85rem' color = colorTextMuted }'event-editor input,event-editor textarea' { font = 'inherit' width = '100%' padding = '.5rem .6rem' color = colorTextStrong background = colorBackgroundSunken border = '1px solid ' + colorBorder borderRadius = '.4rem' }fieldRow { display = 'grid' gridTemplateColumns = '1fr 1fr' gap = '.5rem' }'form.allday label.timed' { display = 'none' }'form.allday field-row' { gridTemplateColumns = '1fr' }'kind-switch,form-buttons' { display = 'flex' flexWrap = 'wrap' gap = '.5rem' }'button.danger' { color = colorText background = colorDanger marginLeft = 'auto' }'button.hidden' { display = 'none' }
Branches
- mainmain branch