gitoria

components

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitef253fecef253fecreports/F4-icons.mdmreef253fec/components/styles.hl

4.3 KB

  1. // components/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). The site shows the library's BASE LOOK (ticket #15): black, white and the greys of
  3. // shared/base.hl — it declares none of the WorldAPI tokens (--color-…), so every component shows its own base fallbacks, as in a bare app.
  4. // Light: white page, black text; the header is the one black block. No frames. In a styles file a bare name is a TAG (camelCase → kebab), a quoted name is a
  5. // selector written verbatim. MOBILE FIRST: every rule is the phone's; the min-width block adds the wide layout.
  6. import { var } from 'hl:web/css'
  7. import { black, greyDark, grey, greyLight, greyLighter, white } from '../shared/base.hl'
  8. '*,
  9. *::before,
  10. *::after' { boxSizing = 'border-box' }
  11. html { colorScheme = 'light' }
  12. body { margin = '0' font = '16px/1.5 system-ui, sans-serif' color = black background = white }
  13. a { color = black textDecoration = 'underline' textUnderlineOffset = '.2em' }
  14. 'a:hover' { textDecorationThickness = '2px' }
  15. h1 { margin = '0 0 1rem' fontSize = '1.3rem' lineHeight = '1.3' color = black }
  16. h2 { margin = '0' fontSize = '1.1rem' color = black }
  17. '.muted' { color = greyDark }
  18. button { font = 'inherit' fontWeight = '600' padding = '.4rem .9rem' color = white background = black border = '0' borderRadius = '.4rem' cursor = 'pointer' }
  19. 'button:hover' { background = greyDark }
  20. 'button.quiet' { color = black background = greyLighter }
  21. 'button.quiet:hover' { background = greyLight }
  22. applicationHeader { position = 'sticky' top = '0' zIndex = '5' display = 'flex' flexWrap = 'wrap' alignItems = 'baseline' gap = '.2rem 1rem' padding = '.6rem 1rem' color = white background = black }
  23. 'application-header .brand' { fontWeight = '800' fontSize = '1.15rem' color = white textDecoration = 'none' }
  24. 'application-header p' { margin = '0' color = grey fontSize = '.9rem' }
  25. // ---- offline (mission 046, components/main.hl): the note under the header, and the probe whose endless animation is
  26. // the shell's 1 s tick (it must be rendered for the animation to run — not display none — so: invisible)
  27. offlineNote { display = 'block' padding = '.5rem 1rem' color = black background = greyLight }
  28. netProbe { position = 'fixed' left = '0' top = '0' width = '1px' height = '1px' opacity = '0' pointerEvents = 'none' animation = 'components-net-tick 1s linear infinite' }
  29. '@keyframes components-net-tick' = {
  30. 'from' = { opacity = '0' }
  31. to = { opacity = '0' }
  32. }
  33. main { display = 'block' maxWidth = '40rem' margin = '0 auto' padding = '1rem' }
  34. // ---- the home ---------------------------------------------------------------------------------
  35. '#components' { display = 'grid' gap = '.5rem' margin = '0' padding = '0' listStyle = 'none' }
  36. '#components li' { display = 'grid' gap = '.15rem' padding = '.7rem 1rem' background = greyLighter borderRadius = '.5rem' }
  37. '#components p' { margin = '0' color = greyDark }
  38. // ---- the Markdown editor demo ------------------------------------------------------------------
  39. 'md-editor-demo h2' { margin = '1rem 0 .3rem' fontSize = '1rem' }
  40. 'md-editor-demo pre' { margin = '0 0 1rem' whiteSpace = 'pre-wrap' overflowWrap = 'anywhere' }
  41. 'md-editor-demo form > md-editor' { margin = '0 0 1rem' }
  42. // ---- the modal demo --------------------------------------------------------------------------------
  43. '.modal-openers' { display = 'flex' flexWrap = 'wrap' gap = '.5rem' }
  44. 'modal-demo input' { font = 'inherit' padding = '.35rem .6rem' color = black background = greyLighter border = '0' borderRadius = '.4rem' }
  45. // ---- the pick-first demo (files upload in pick mode, ticket #18): a chat input — the field and Send in one row, Send 44 px high
  46. '#sent' { display = 'grid' gap = '.5rem' margin = '0 0 1rem' padding = '0' listStyle = 'none' }
  47. '#sent li' { padding = '.5rem .8rem' background = greyLighter borderRadius = '.5rem' }
  48. '#sent p' { margin = '0' overflowWrap = 'anywhere' }
  49. '#sent .sent-files' { fontSize = '.85rem' color = greyDark }
  50. '#chat-form' { display = 'flex' gap = '.5rem' alignItems = 'flex-end' }
  51. '#chat-text' { flex = '1' minWidth = '0' minHeight = '2.75rem' font = 'inherit' padding = '.5rem .7rem' color = black background = greyLighter border = '0' borderRadius = '.4rem' resize = 'vertical' }
  52. '#chat-send' { minHeight = '2.75rem' minWidth = '2.75rem' }

Branches

Latest commits

  • ef253fecreports/F4-icons.mdmre
  • ba96735ficons: README, md-editor README note, gate checks for the single focus ring and toolbar iconsmre
  • 96c97691icons: shared Icon component; md-editor toolbar and files-upload remove use it; no inner focus ring in md-editormre
  • 0d6863d6reports/F3-mdvalue.mdmre
  • d58ed98bMdEditor: an older text of the editor handed back is not an outside change (kept surface, written back); gate for itmre
  • c2d0de59MdEditor: show a value that changes from outside (data-value observer), demo button and gatemre
  • c4272fa3re-vendor Hybriel 5406d146 (hl:web batches 9+10: #72 emits while the socket is closed delivered after reconnect, browser boot linear, faster list appends; contains int 6–14 + m406)mre
  • 2e22618etests: cdp-blank/md-bg/md-keys-run Chrome range and base port from env (MDK_CHROME, MDK_PORT), defaults unchangedmre
  • a5d2384bre-vendor Hybriel 6f8a0689 (int 6–11: streaming cursors, #203 index heal + close() fix, fd403 listDir/cursor fds, hl:time browser side, hl:web batches 5+6)mre
  • 52902d23docker-compose: nofile 65536 (Hybriel int 6+ boot opened >1024 files in the tracker)mre
  • 022b943fdeploy: backup copies index files first and *.mpack data last (hot-copy skew, hybriel #203)mre
  • d17f8543mission 012: re-vendor Hybriel master f9614007 (plugins), fixes comments push redraw; gate 480/0mre
  • 5f95de05mission 012: re-vendor Hybriel ce6f2e0a (plugins), report: gate 478/2 on comments push redrawmre
  • 3794c591mission 011: report, LOG, STATUS, md-keys-run widths, cdp-blank helpermre
  • 77a93c16mission 011: gate hook for md-keys (480/0), flatten() runs one at a time (removeChild race), surface also built on first focus / pointer-down (background tab), md-bg test, README keysmre
  • 3c906718mission 011: md-editor key tests (real keys) and fixes: nested p/ul flatten, bare br, link change, Ctrl+E, code block exit (WIP)mre
  • 1442e583mission 010: report, LOG, STATUSmre
  • 6f27ad31md-editor: phone toolbar row contained (inline-size) so it never widens a grid parentmre
  • d702d76dmd-editor look: root class md-empty (a host .empty rule hit it), rows = surface height, one phone toolbar row with 44 px targets; comment form rows 3; gate 360/0mre
  • 15be2ac0comments: attach (FilesUpload pick), onPost(text, files), files per comment; md-editor files=off; README, gate fixmre