gitoriaLog in with ident

components

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit4b4dabe54b4dabe5State of 2026-09-27, before the move to gitoriamre4b4dabe5/styles.hl

2.8 KB

  1. // styles.hl — the SITE's own CSS (page layout: header, main, the home list), served as /__hl/app.css. Every component
  2. // carries its own Style in its file (components/*/*.hl). Tokens: shared/tokens.hl (verbatim copy of loreana worldapi-tokens/tokens.hl);
  3. // the site sets only its accent. In a styles file a bare name is a TAG (camelCase → kebab), a quoted name is a
  4. // selector written verbatim. MOBILE FIRST: every rule is the phone's; the min-width block adds the wide layout.
  5. import { var } from 'hl:web/css'
  6. import { blueLight, colorText, colorBackground, colorTextStrong, colorTextMuted, colorBackgroundSunken, colorSurface, colorBorder, colorAccentText } from './shared/tokens.hl'
  7. colorAccent = var(blueLight) // the site's accent: the only token it sets
  8. '*,
  9. *::before,
  10. *::after' { boxSizing = 'border-box' }
  11. html { colorScheme = 'dark' }
  12. body { margin = '0' font = '16px/1.5 system-ui, sans-serif' color = colorText background = colorBackground }
  13. a { color = colorAccent textDecoration = 'none' }
  14. 'a:hover' { textDecoration = 'underline' }
  15. h1 { margin = '0 0 1rem' fontSize = '1.3rem' lineHeight = '1.3' color = colorTextStrong }
  16. h2 { margin = '0' fontSize = '1.1rem' color = colorTextStrong }
  17. '.muted' { color = colorTextMuted }
  18. button { font = 'inherit' fontWeight = '600' padding = '.4rem .9rem' color = colorAccentText background = colorAccent border = '0' borderRadius = '.4rem' cursor = 'pointer' }
  19. 'button:hover' { filter = 'brightness(1.1)' }
  20. 'button.quiet' { color = colorText background = 'transparent' border = '1px solid ' + colorBorder }
  21. 'button.quiet:hover' { background = colorSurface filter = 'none' }
  22. 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 }
  23. 'application-header .brand' { fontWeight = '800' fontSize = '1.15rem' color = colorAccent }
  24. 'application-header p' { margin = '0' color = colorTextMuted fontSize = '.9rem' }
  25. main { display = 'block' maxWidth = '40rem' margin = '0 auto' padding = '1rem' }
  26. // ---- the home ---------------------------------------------------------------------------------
  27. '#components' { display = 'grid' gap = '.5rem' margin = '0' padding = '0' listStyle = 'none' }
  28. '#components li' { display = 'grid' gap = '.15rem' padding = '.7rem 1rem' background = colorSurface border = '1px solid ' + colorBorder borderRadius = '.5rem' }
  29. '#components p' { margin = '0' color = colorTextMuted }
  30. // ---- the Markdown editor demo ------------------------------------------------------------------
  31. 'md-editor-demo h2' { margin = '1rem 0 .3rem' fontSize = '1rem' }
  32. 'md-editor-demo pre' { margin = '0 0 1rem' whiteSpace = 'pre-wrap' overflowWrap = 'anywhere' }
  33. 'md-editor-demo form > md-editor' { margin = '0 0 1rem' }

Branches

Latest commits

  • 4b4dabe5State of 2026-09-27, before the move to gitoriamre