gitoria

jukebox

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit4f0ad42f4f0ad42fMission 006: jukebox#20mre4f0ad42f/plugins/web/cssvar.hl

930 B

  1. // ONE CSS CUSTOM PROPERTY, declared as a value: `bg = var('#FFF')` in a styles file
  2. // (`import { var } from 'hl:web/css'`). The sheet walker (css.hl) gives it its NAME
  3. // from the member it is bound to, writes `--bg: #FFF` into the sheet's one `:root`,
  4. // and every use — `color = bg`, or inside a composed value `'1px solid ' + rule` —
  5. // becomes `var(--bg)`. Inside a composed value the name is not known yet (the
  6. // string is built when the styles file is constructed, before the walker names
  7. // anything), so the text carries a PLACEHOLDER by id that the walker replaces.
  8. value = null // the declared value, as written
  9. dark = null // the value under prefers-color-scheme: dark, or null
  10. Number id = 0 // minted at construction; the walker maps id → name
  11. name = null // set by the walker from the member that holds it
  12. __toString() {
  13. return 'var(--hlv' + id + ')'
  14. }

Branches

Latest commits

  • 4f0ad42fMission 006: jukebox#20mre
  • 800cae06Records: #21 planmre
  • 64bc7823Records: #21 causemre
  • 76639655Records: B1 questionmre
  • d7906b36Records: mission 005 startedmre
  • d3df773cMission 005: doc linemre
  • 6a5d840aMission 005: jukebox#22mre
  • 13e5e748Records: mission 004 startedmre
  • a8098271Mission 004: jukebox#21mre
  • df8f5205Records: jukebox#19-21, #11 closedmre
  • b7a4e692Records: hybriel#298mre
  • 9bcbb017Records: day38b waits for day39 fixmre
  • f80504e1Records: day38b repro sentmre
  • 8048258bRecords: day38b jb3 regression, L1 Chromes stoppedmre
  • 68aace7fRecords: mission 003 day38bmre
  • d105d8a9Records: mpackdb integrity check cleanmre
  • 6e980c53Records: mpackdb rule refinementmre
  • 6d335ac4Records: storage copy rulingmre
  • 7eb2898dRecords: mpackdb second-opener rule until day38mre
  • b011f98eRecords: style form live on day35mre