gitoria

components

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit29eb07ea29eb07eaPhone: 44 px targets on the site (brand, home links, buttons), comments, modal and pagination; the header is the brand alone on a phone; comments demo: labelled 'You are' group with the chosen user pressed (MC)mre29eb07ea/components/styles.hl

5.0 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' minHeight = '2.75rem' 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 = '.3rem 1rem' color = white background = black }
  23. 'application-header .brand' { display = 'inline-flex' alignItems = 'center' minHeight = '2.75rem' fontWeight = '800' fontSize = '1.15rem' color = white textDecoration = 'none' }
  24. // the tagline only where there is room: on a phone the header is the brand alone (44 px target, no second line)
  25. 'application-header p' { display = 'none' margin = '0' color = grey fontSize = '.9rem' }
  26. '@media (min-width: 40rem)' {
  27. 'application-header p' { display = 'block' }
  28. }
  29. // ---- offline (mission 046, components/main.hl): the note under the header, and the probe whose endless animation is
  30. // the shell's 1 s tick (it must be rendered for the animation to run — not display none — so: invisible)
  31. offlineNote { display = 'block' padding = '.5rem 1rem' color = black background = greyLight }
  32. netProbe { position = 'fixed' left = '0' top = '0' width = '1px' height = '1px' opacity = '0' pointerEvents = 'none' animation = 'components-net-tick 1s linear infinite' }
  33. '@keyframes components-net-tick' = {
  34. 'from' = { opacity = '0' }
  35. to = { opacity = '0' }
  36. }
  37. main { display = 'block' maxWidth = '40rem' margin = '0 auto' padding = '1rem' }
  38. // ---- the home ---------------------------------------------------------------------------------
  39. '#components' { display = 'grid' gap = '.5rem' margin = '0' padding = '0' listStyle = 'none' }
  40. '#components li' { display = 'grid' gap = '.15rem' padding = '.7rem 1rem' background = greyLighter borderRadius = '.5rem' }
  41. '#components p' { margin = '0' color = greyDark }
  42. '#components a' { display = 'flex' alignItems = 'center' minHeight = '2.75rem' }
  43. // the demo pages' Send row: air between the field and its button, whatever the page's paragraph margin
  44. '.demo-send' { margin = '1rem 0 0' }
  45. // "You are: alice bob nobody": a labelled group of buttons, the chosen one filled, the others quiet
  46. '.comments-who' { display = 'flex' flexWrap = 'wrap' alignItems = 'center' gap = '.5rem' }
  47. // ---- the Markdown editor demo ------------------------------------------------------------------
  48. 'md-editor-demo h2' { margin = '1rem 0 .3rem' fontSize = '1rem' }
  49. 'md-editor-demo pre' { margin = '0 0 1rem' whiteSpace = 'pre-wrap' overflowWrap = 'anywhere' }
  50. 'md-editor-demo form > md-editor' { margin = '0 0 1rem' }
  51. // ---- the modal demo --------------------------------------------------------------------------------
  52. '.modal-openers' { display = 'flex' flexWrap = 'wrap' gap = '.5rem' }
  53. 'modal-demo input' { font = 'inherit' padding = '.35rem .6rem' color = black background = greyLighter border = '0' borderRadius = '.4rem' }
  54. // ---- 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
  55. '#sent' { display = 'grid' gap = '.5rem' margin = '0 0 1rem' padding = '0' listStyle = 'none' }
  56. '#sent li' { padding = '.5rem .8rem' background = greyLighter borderRadius = '.5rem' }
  57. '#sent p' { margin = '0' overflowWrap = 'anywhere' }
  58. '#sent .sent-files' { fontSize = '.85rem' color = greyDark }
  59. '#chat-form' { display = 'flex' gap = '.5rem' alignItems = 'flex-end' }
  60. '#chat-text' { flex = '1' minWidth = '0' minHeight = '2.75rem' font = 'inherit' padding = '.5rem .7rem' color = black background = greyLighter border = '0' borderRadius = '.4rem' resize = 'vertical' }
  61. '#chat-send' { minHeight = '2.75rem' minWidth = '2.75rem' }

Branches

Latest commits

  • 29eb07eaPhone: 44 px targets on the site (brand, home links, buttons), comments, modal and pagination; the header is the brand alone on a phone; comments demo: labelled 'You are' group with the chosen user pressed (MC)mre
  • d1cc83e2reports/E2-toolbar.mdmre
  • 214c3183MdEditor on a phone: toolbar as two even rows of 44 px targets (no clipped icon, no swipe), 'Markdown source' label 15 px, table head 16 px; gate checks (E2)mre
  • 9215bbaareports/F5-empty.mdmre
  • 134b4e3eMdEditor: an editor the framework puts into the page is built at once (page observer), a surface put in anew under a built editor is redrawn; gates for both (hybriel#211)mre
  • 0dce2899reports/K1-bubble.mdmre
  • 6b0936a0comments: 'edited' foldable also drops the theme's border, margin and radius (display: contents alone left them computed)mre
  • 8d79ff79comments bubble hugs its content: a readonly md-editor surface gets no inline min-height (it beat the stylesheet's min-height 0); 'edited' is a quiet label beside the time, versions unframed; gate checksmre
  • 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