gitoria

layouts

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit97110ad997110ad9WIP: nest accepted layout selectors; stopped at startup parse failuremre97110ad9/theme/shell/list-first.hl

3.9 KB

  1. // list-first.hl — SHELL 2, e.g. Notes: the list and the opened item (docs/layouts/list-first.md).
  2. // Phone: the list first; a tap on an item opens its page, where only the item shows (with a `a.back` link to the list).
  3. // 60rem+: list and item side by side over the full width, each scrolling on its own; `/` shows a welcome text.
  4. //
  5. // ListFirst { view = view // 'list' on the list's own route, 'detail' on an item's route
  6. // aside { ul { li { a { href = "/notes/n1" class = "selected" "Reading list" } } } }
  7. // main { a { class = "back" href = "/notes" "All notes" } h1 { "Reading list" } … }
  8. // }
  9. String view = 'list'
  10. slot = null
  11. Style {
  12. listFirst {
  13. display = 'block'
  14. @media {
  15. minWidth = '60rem'
  16. display = 'grid'
  17. gridTemplateColumns = 'var(--layout-list) minmax(0, 1fr)'
  18. height = 'calc(100dvh - var(--layout-header))'
  19. }
  20. }
  21. // Keep the whole selector for selector list.
  22. // Caller slot content must keep whole selectors (layouts#8; probe v23).
  23. 'list-first > aside li a,
  24. list-first > aside li > a:first-child' {
  25. display = 'flex'
  26. flexDirection = 'column'
  27. alignItems = 'stretch'
  28. justifyContent = 'center'
  29. gap = '.1rem'
  30. minHeight = 'var(--layout-tap)'
  31. padding = '.6rem .75rem'
  32. color = 'var(--color-text)'
  33. borderRadius = 'var(--radius-small)'
  34. }
  35. // Keep the whole selector for selector list.
  36. // No nested attribute-selector form on day44 (probes v05/v06).
  37. 'list-first > aside li a.selected,
  38. list-first > aside li a[aria-current="page"]' {
  39. color = 'var(--color-text-strong)'
  40. background = 'var(--color-surface)'
  41. }
  42. // Keep the whole selector for selector list.
  43. // Caller slot content must keep whole selectors (layouts#8; probe v23).
  44. 'list-first > aside input,
  45. list-first > aside select' {
  46. width = '100%'
  47. background = 'var(--color-background)'
  48. }
  49. // Keep the whole selector for pseudo-element.
  50. // No nested pseudo-element form on day44 (probes v09/v10; hybriel#344/#345/#260).
  51. 'list-first a.back::before' {
  52. content = '"‹ "'
  53. }
  54. @media {
  55. minWidth = '60rem'
  56. // Caller slot content must keep whole selectors (layouts#8; probe v23).
  57. 'list-first > aside,
  58. list-first.detail > aside' {
  59. display = 'block'
  60. minHeight = '0'
  61. overflowY = 'auto'
  62. padding = '1rem .75rem 2rem'
  63. background = 'var(--color-background-sunken)'
  64. }
  65. // Caller slot content must keep whole selectors (layouts#8; probe v23).
  66. 'list-first > main,
  67. list-first.list > main' {
  68. display = 'block'
  69. minHeight = '0'
  70. overflowY = 'auto'
  71. padding = '1.5rem clamp(1.5rem, 5vw, 5rem) 3rem'
  72. }
  73. }
  74. // Caller slot content is unknown here, so its selectors must be whole.
  75. // Caller slot content must keep whole selectors (layouts#8; probe v23).
  76. 'list-first > aside' {
  77. display = 'block'
  78. padding = '.5rem calc(var(--layout-gutter) - .75rem) 2rem'
  79. }
  80. // Caller slot content must keep whole selectors (layouts#8; probe v23).
  81. 'list-first > aside ul' {
  82. margin = '0'
  83. padding = '0'
  84. listStyle = 'none'
  85. }
  86. // Caller slot content must keep whole selectors (layouts#8; probe v23).
  87. 'list-first > aside li' {
  88. margin = '0'
  89. }
  90. // Caller slot content must keep whole selectors (layouts#8; probe v23).
  91. 'list-first > aside li a:hover' {
  92. textDecoration = 'none'
  93. background = 'var(--color-surface)'
  94. }
  95. // Caller slot content must keep whole selectors (layouts#8; probe v23).
  96. 'list-first > main' {
  97. display = 'block'
  98. minWidth = '0'
  99. padding = '1rem var(--layout-gutter) 3rem'
  100. }
  101. // Caller slot content must keep whole selectors (layouts#8; probe v23).
  102. 'list-first a.back' {
  103. display = 'inline-flex'
  104. alignItems = 'center'
  105. minHeight = 'var(--layout-tap)'
  106. marginBottom = '1rem'
  107. fontWeight = '600'
  108. @media {
  109. minWidth = '60rem'
  110. display = 'none'
  111. }
  112. }
  113. // Caller slot content must keep whole selectors (layouts#8; probe v23).
  114. 'list-first.list > main' {
  115. display = 'none'
  116. }
  117. // Caller slot content must keep whole selectors (layouts#8; probe v23).
  118. 'list-first.detail > aside' {
  119. display = 'none'
  120. }
  121. }
  122. View {
  123. listFirst { class = view slot }
  124. }

Branches

Latest commits

  • 97110ad9WIP: nest accepted layout selectors; stopped at startup parse failuremre
  • ce4a0baeKeep caller slot styles whole so minimal shell apps startmre
  • 12cd3992Re-vendor complete Hybriel plugins and runtime to day44mre
  • b05c20feBackup tar: --hard-dereference, so mpackdb sidecars are never stored as hard links (Tracker's finding)mre
  • 8d9ed0b8Re-vendor complete Hybriel plugins and runtime to day39mre
  • ebd00b6cNest caller slot styles in three-panemre
  • 009991efNest caller slot styles in list-firstmre
  • 494d75d4Nest caller slot styles in app-sidebarmre
  • e5571680Align all plugin sources with Hybriel day38bmre
  • 5d204c46Re-vendor layouts to Hybriel set day38bmre
  • 17e0f03eNest html-prefixed theme component overridesmre
  • e54e735eFormat plain theme elements with nested rules and bare mediamre
  • 547f834eRecord LY7 deployment and live verificationmre
  • fa4600b1Link caller-slot style exceptions to hybriel#270mre
  • 413b11e1Record corrected LY7 nesting, exact CSS and Chrome proofmre
  • b810453etracker-demo: nest child and compound selectors in Stylemre
  • 0b5b1d61notes-demo: nest child and compound selectors in Stylemre
  • ab22bdc2mail-demo: nest child and compound selectors in Stylemre
  • fe2d8de9home: nest child and compound selectors in Stylemre
  • e631791buser-menu: nest child and compound selectors in Stylemre