gitoria

ident

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Branchf6-styles75740179ident#34: access.hl: the remaining lead classes droppedmref6-styles/components/styles.hl

5.0 KB

  1. // styles.hl — the app's CSS, served as /__hl/app.css. It INHERITS THE WORLDAPI THEME (theme/theme.hl, copied verbatim from
  2. // layouts.worldapi.org dbe3de7 — never edited here; docs: layouts docs/using-the-theme.md) and keeps only what is page-wide:
  3. // the app accent, the page column every page sits in, and the patterns several components share (form lines and buttons, the
  4. // account bar, the lists of rows, the form cards). Every component's own look is in its own Style block (ident#33).
  5. //
  6. // TOKENS: colours only through the named tokens (shared/tokens.hl = layouts' file, byte-equal); the app sets only its accent
  7. // (orange). Corners: radiusSmall (5px) / radiusLarge (10px: panels, rows). Borderless — `node theme/check-theme.mjs .` must
  8. // report 0 problems (a deploy gate).
  9. // In a styles file a bare name is a TAG (camelCase → kebab), a quoted name is a selector written verbatim; a selector the theme
  10. // already writes may not be written again (hl:web refuses it) — so the theme's own elements are NOT repeated here.
  11. // PHONE FIRST: every rule outside a block is the phone's (390 px); the `@media` blocks only ADD the wide layout (from 60rem,
  12. // the theme's breakpoint).
  13. inherit '../theme/theme.hl'
  14. import { var } from 'hl:web/css'
  15. import { orange, colorBackgroundSunken, colorTextStrong, colorTextMuted, colorDanger, colorSuccess, colorSurface } from '../shared/tokens.hl'
  16. colorAccent = var(orange) // the app's accent: the only token this app sets
  17. // ---- the page column (every page, signed in or out): centred, no panel ----------------------------------------------------
  18. identCard {
  19. display = 'grid'
  20. gap = '1rem'
  21. maxWidth = '34rem'
  22. margin = '0 auto'
  23. }
  24. 'ident-card h1,
  25. ident-card h2,
  26. ident-card p' {
  27. margin = '0'
  28. }
  29. 'ident-card form' {
  30. display = 'grid'
  31. gap = '.8rem'
  32. }
  33. 'ident-card label' {
  34. display = 'grid'
  35. gap = '.25rem'
  36. marginBottom = '0'
  37. }
  38. 'ident-card section' {
  39. display = 'grid'
  40. gap = '.8rem'
  41. }
  42. // the wide pages (inbox, per-app settings, identity page)
  43. 'ident-card.wide' {
  44. maxWidth = '46rem'
  45. }
  46. @media {
  47. minWidth = '60rem'
  48. identCard {
  49. gap = '1.2rem'
  50. }
  51. }
  52. // ---- shared by several components: form lines, the status lines, section heads -----------------------------------------------
  53. formButtons {
  54. display = 'flex'
  55. flexWrap = 'wrap'
  56. gap = '.5rem'
  57. }
  58. fieldHint {
  59. color = colorTextMuted
  60. fontSize = '.875rem'
  61. fontWeight = '400'
  62. }
  63. sectionHead {
  64. display = 'flex'
  65. flexWrap = 'wrap'
  66. alignItems = 'center'
  67. justifyContent = 'space-between'
  68. gap = '.5rem'
  69. }
  70. code {
  71. fontFamily = 'ui-monospace, monospace'
  72. fontSize = '.875rem'
  73. color = colorTextStrong
  74. overflowWrap = 'anywhere'
  75. wordBreak = 'break-all'
  76. }
  77. // ---- signed in: the account bar of apps, inbox and per-app settings -------------------------------------------------------------
  78. // The user menu (header, a popover over the top right) carries the email, Sign out and Sign out everywhere on every page. On a PHONE the
  79. // account bar keeps only the page's own link, at the LEFT — the open menu then covers nothing of the page (tests/mobile.mjs); from 60rem
  80. // the address shows and the link goes to the right (ident#35: the phone is the base, the wide layout is added)
  81. accountBar {
  82. display = 'flex'
  83. flexWrap = 'wrap'
  84. alignItems = 'center'
  85. justifyContent = 'flex-start'
  86. gap = '.25rem .5rem'
  87. }
  88. 'account-bar a' {
  89. display = 'inline-flex'
  90. alignItems = 'center'
  91. minHeight = 'var(--layout-tap)'
  92. minWidth = 'var(--layout-tap)'
  93. justifyContent = 'center'
  94. }
  95. userEmail {
  96. display = 'none'
  97. color = colorTextMuted
  98. fontSize = '.875rem'
  99. overflowWrap = 'anywhere'
  100. }
  101. @media {
  102. minWidth = '60rem'
  103. accountBar {
  104. justifyContent = 'space-between'
  105. }
  106. userEmail {
  107. display = 'block'
  108. }
  109. }
  110. // ---- the lists of rows (identities, used in, choice, apps, inbox, connections, kinds): one pattern; each component adds its own parts
  111. '#identities,
  112. #usedin,
  113. #chooselist,
  114. #apps,
  115. #inbox,
  116. #conns,
  117. #kinds' {
  118. listStyle = 'none'
  119. margin = '0'
  120. padding = '0'
  121. display = 'grid'
  122. gap = '.5rem'
  123. }
  124. '#identities li,
  125. #usedin li,
  126. #chooselist li,
  127. #apps li,
  128. #inbox li,
  129. #conns li,
  130. #kinds li' {
  131. display = 'flex'
  132. flexWrap = 'wrap'
  133. alignItems = 'center'
  134. justifyContent = 'space-between'
  135. gap = '.5rem'
  136. margin = '0'
  137. padding = '.7rem .8rem'
  138. background = colorSurface
  139. borderRadius = radiusLarge
  140. }
  141. // ---- the form cards (the identity form and the app form) --------------------------------------------------------------------------
  142. '#identityform,
  143. #appform' {
  144. display = 'grid'
  145. gap = '.8rem'
  146. padding = '1rem'
  147. background = colorSurface
  148. borderRadius = radiusLarge
  149. }
  150. '#identityform input,
  151. #appform input' {
  152. background = colorBackgroundSunken
  153. }
  154. // every grid item may shrink (a wide field pushed the form past the screen)
  155. '#identityform > *,
  156. #appform > *' {
  157. minWidth = '0'
  158. }
  159. // the brand link of the theme's header is 43 px wide at 390 (the tap minimum is 44 × 44): a minimum width, here, because the theme
  160. // is never edited in an app
  161. 'html application-header > a.brand' {
  162. minWidth = 'var(--layout-tap)' // (html + > : outranks the theme's own `application-header > a.brand { min-width: 0 }`; real Chrome measured it 43 px)
  163. }

Branches

Latest commits

  • 75740179ident#34: access.hl: the remaining lead classes droppedmre
  • 760fba95ident#34: access.hl drops its unstyled lead class (the shared lead rule would otherwise mute it)mre
  • 47841dd4ident#34: the access page keeps its lead class string (the page has no ident-card, so its lead line was never muted; a shared rule would change the look)mre
  • 7ae13f59ident#34: the lead, message and notice lines are named with Style.pLead / pMessage / pNotice (shared bodies in lib/looks.hl) instead of class stringsmre
  • b323265aMerge branch 'f5-styles' into mainIdent
  • 9ced53c3|||PR ident#33 ident#35 every component's styles live in its own Style block; styles.hl keeps the page-wide rest; the account bar is phone first (min-width: 60rem block); the avatar preview is hidden with the hidden attribute (ident#34 in part)mre
  • f28333e4ident#33 ident#35: styles.hl keeps only the accent, the page column and the shared patterns; the account bar is written phone first (base rule + one min-width: 60rem block) instead of a max-width overridemre
  • 5b4541fcident#33: the selector sign-in frame's rules move into embed.hl's Stylemre
  • 00235f21ident#33: the per-app notification switches move into appsettings.hl's Stylemre
  • 2249945cident#33: the inbox and connection list rules move into inbox.hl's Stylemre
  • f2d9f79fident#33: the apps list and the secret box move into apps.hl's Stylemre
  • 8370b748ident#33: the app request box moves into home.hl's Stylemre
  • 40bf3b97ident#33: the 404 page's home link rule moves into notfound.hlmre
  • 40627a89ident#33: the time zone section's spacing moves into timezone.hlmre
  • d389db08ident#33: the identity page's rules and the Notif. chip move into identity.hl's Stylemre
  • ddda0b5bident#33: the identity row's parts move into identitylist.hl's Stylemre
  • 47e516afident#33 ident#34: the identity form's avatar rules move into identityform.hl; the preview and Remove button are hidden with the hidden attribute instead of built class strings (avatarPreviewClass, avatarRemoveClass gone)mre
  • 5cb5cf0eident#33: the code field's look moves into codestep.hl's Stylemre
  • f421cd60ident#33: the shell's own rules (user menu address, offline note, network probe) move into main.hl's Stylemre
  • c512fb96Merge branch 'f4-homesplit' into mainIdent