gitoriaLog in with ident

notes

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commiteee693b8eee693b8deploy.sh: never send .git or .gitignore to Byrodinmreeee693b8/styles.hl

5.5 KB

  1. // styles.hl — ALL of the app's CSS, served as /__hl/app.css. Components carry no Style blocks: markup is domain
  2. // tags (<note-book>, <note-list>, <note-reader>, …), this file lays them out. Tokens: shared/tokens.hl (verbatim
  3. // copy of loreana worldapi-tokens/tokens.hl); the app sets only its accent (yellow).
  4. // In a styles file a bare name is a TAG (camelCase → kebab), a quoted name is a selector written verbatim.
  5. // MOBILE FIRST: every rule is the phone's (the list first; a selected note replaces it); the one min-width block
  6. // adds the wide layout (list and note side by side).
  7. import { var } from 'hl:web/css'
  8. import { yellow, colorText, colorBackground, colorTextStrong, colorTextMuted, colorBackgroundSunken, colorAccentText, colorSurface, colorBorder, colorDanger } from './shared/tokens.hl'
  9. colorAccent = var(yellow) // the app's accent: the only token this app sets
  10. '*,
  11. *::before,
  12. *::after' { boxSizing = 'border-box' }
  13. html { colorScheme = 'dark' }
  14. body { margin = '0' font = '16px/1.5 system-ui, sans-serif' color = colorText background = colorBackground }
  15. a { color = colorAccent textDecoration = 'none' }
  16. 'a:hover' { textDecoration = 'underline' }
  17. h1 { margin = '0' fontSize = '1.3rem' lineHeight = '1.3' color = colorTextStrong overflowWrap = 'anywhere' }
  18. p { margin = '0' }
  19. 'input,
  20. textarea' { font = 'inherit' width = '100%' padding = '.5rem .7rem' color = colorTextStrong background = colorBackgroundSunken border = '1px solid ' + colorBorder borderRadius = '.4rem' }
  21. button { font = 'inherit' fontWeight = '600' padding = '.55rem 1.1rem' color = colorAccentText background = colorAccent border = '0' borderRadius = '.4rem' cursor = 'pointer' }
  22. 'button:hover' { filter = 'brightness(1.1)' }
  23. 'button.quiet' { color = colorText background = 'transparent' border = '1px solid ' + colorBorder padding = '.35rem .8rem' fontSize = '.9rem' }
  24. 'button.danger' { color = colorTextStrong background = colorDanger padding = '.35rem .8rem' fontSize = '.9rem' }
  25. // ---- the shell ---------------------------------------------------------------------------
  26. applicationHeader { position = 'sticky' top = '0' zIndex = '5' display = 'flex' flexWrap = 'wrap' alignItems = 'center' gap = '.5rem 1rem' padding = '.6rem 1rem' background = colorBackgroundSunken borderBottom = '1px solid ' + colorBorder }
  27. 'application-header .brand' { fontWeight = '800' fontSize = '1.15rem' color = colorAccent marginRight = 'auto' }
  28. main { display = 'block' padding = '1rem' }
  29. userBox { display = 'flex' flexWrap = 'wrap' alignItems = 'center' justifyContent = 'flex-end' gap = '.4rem .6rem' marginLeft = 'auto' maxWidth = '100%' }
  30. // the identity selector: ident's shadow DOM, restyled to the accent
  31. identSelector { '--ident-accent' = colorAccent '--ident-accent-text' = colorAccentText '--ident-background' = colorSurface '--ident-border' = colorBorder '--ident-font' = '600 .9rem/1.4 system-ui, sans-serif' }
  32. 'ident-selector::part(button)' { padding = '.35rem .8rem' }
  33. 'ident-selector::part(status)' { padding = '.35rem .8rem' }
  34. 'a.button' { display = 'inline-block' fontWeight = '600' fontSize = '.9rem' padding = '.35rem .8rem' color = colorAccent border = '1px solid ' + colorAccent borderRadius = '.4rem' }
  35. 'a.button:hover' { textDecoration = 'none' background = colorSurface }
  36. '.message' { color = colorDanger fontSize = '.9rem' }
  37. '.message:empty' { display = 'none' }
  38. '.banner' { margin = '0' padding = '.5rem 1rem' background = colorSurface }
  39. '.empty' { padding = '1rem' textAlign = 'center' color = colorTextMuted border = '1px dashed ' + colorBorder borderRadius = '.5rem' }
  40. '.muted' { fontSize = '.9rem' color = colorTextMuted }
  41. // ---- the notes: the list first; a selected note (noteBook.open) replaces it on a phone ------------------
  42. noteBook { display = 'block' }
  43. noteList { display = 'grid' gap = '.6rem' alignContent = 'start' }
  44. 'note-list > header' { display = 'flex' alignItems = 'center' justifyContent = 'space-between' gap = '1rem' }
  45. '#notes' { display = 'grid' gap = '.3rem' margin = '0' padding = '0' listStyle = 'none' }
  46. '#notes a' { display = 'block' padding = '.55rem .8rem' color = colorText background = colorSurface border = '1px solid ' + colorBorder borderRadius = '.4rem' overflowWrap = 'anywhere' }
  47. '#notes a:hover' { textDecoration = 'none' borderColor = colorAccent }
  48. '#notes a.selected' { color = colorTextStrong borderColor = colorAccent borderLeftWidth = '.3rem' }
  49. noteReader { display = 'block' minWidth = '0' }
  50. noteEditor { display = 'grid' gap = '.8rem' }
  51. 'note-editor footer' { display = 'flex' flexWrap = 'wrap' alignItems = 'center' gap = '.6rem' }
  52. 'note-editor .back' { justifySelf = 'start' }
  53. '.ask' { display = 'none' alignItems = 'center' gap = '.6rem' }
  54. '.ask.open' { display = 'flex' flexWrap = 'wrap' }
  55. 'note-book.open note-list' { display = 'none' }
  56. 'note-book:not(.open) note-reader' { display = 'none' }
  57. mdEditor { '--md-background' = colorBackgroundSunken '--md-text' = colorText '--md-text-strong' = colorTextStrong '--md-text-muted' = colorTextMuted '--md-border' = colorBorder '--md-accent' = colorAccent '--md-accent-text' = colorAccentText '--md-link' = colorAccent '--md-code-background' = colorSurface '--md-toolbar-background' = colorSurface '--md-danger' = colorDanger '--md-min-height' = '18rem' color = colorText }
  58. '@media (min-width: 50rem)' = {
  59. noteBook = { display = 'grid' gridTemplateColumns = '20rem minmax(0, 1fr)' gap = '1.5rem' alignItems = 'start' }
  60. 'note-book.open note-list' = { display = 'grid' }
  61. 'note-book:not(.open) note-reader' = { display = 'block' }
  62. 'note-editor .back' = { display = 'none' }
  63. }

Branches

Latest commits

  • eee693b8deploy.sh: never send .git or .gitignore to Byrodinmre
  • c8904061State of 2026-09-27, before the move to gitoriamre