gitoria

jukebox

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitf036bab4f036bab4search: format styles with nested rules and bare queriesmref036bab4/theme/shell/three-pane.hl

4.0 KB

  1. // three-pane.hl — SHELL 3, e.g. an email client: folders, the list of the open folder, the opened item with its own actions
  2. // (docs/layouts/three-pane.md).
  3. // Phone: the list first (folders = the sidebar overlay from the header's toggle); a tap on an item shows it and the list
  4. // goes (`a.back` returns). 60rem+: all three side by side over the full width, each scrolling on its own.
  5. //
  6. // ThreePane { view = view // 'list' on the folder's route, 'detail' on an item's route
  7. // Sidebar { nav { a { href = "/inbox" 'aria-current' = "page" "Inbox" } } }
  8. // aside { ul { li { a { href = "/inbox/m1" "Subject" } } } }
  9. // main { a { class = "back" href = "/inbox" "Inbox" } menu { li { button { "Reply" } } } article { … } }
  10. // }
  11. String view = 'list'
  12. slot = null
  13. Style {
  14. threePane {
  15. display = 'block'
  16. '> aside' {
  17. display = 'block'
  18. padding = '.5rem calc(var(--layout-gutter) - .75rem) 2rem'
  19. }
  20. '> main' {
  21. display = 'block'
  22. minWidth = '0'
  23. padding = '1rem var(--layout-gutter) 3rem'
  24. '> menu' {
  25. position = 'sticky'
  26. top = 'var(--layout-header)'
  27. zIndex = '2'
  28. display = 'flex'
  29. flexWrap = 'wrap'
  30. gap = '.25rem'
  31. margin = '0 0 1.25rem'
  32. padding = '.3rem'
  33. listStyle = 'none'
  34. background = 'var(--color-background-sunken)'
  35. borderRadius = 'var(--radius-large)'
  36. @media {
  37. minWidth = '60rem'
  38. top = '0'
  39. }
  40. }
  41. }
  42. 'a.back' {
  43. display = 'inline-flex'
  44. alignItems = 'center'
  45. minHeight = 'var(--layout-tap)'
  46. marginBottom = '1rem'
  47. fontWeight = '600'
  48. @media {
  49. minWidth = '60rem'
  50. display = 'none'
  51. }
  52. }
  53. @media {
  54. minWidth = '60rem'
  55. display = 'grid'
  56. gridTemplateColumns = 'var(--layout-sidebar) var(--layout-list) minmax(0, 1fr)'
  57. height = 'calc(100dvh - var(--layout-header))'
  58. '> app-sidebar' {
  59. minHeight = '0'
  60. overflowY = 'auto'
  61. padding = '1rem .75rem 2rem'
  62. }
  63. }
  64. }
  65. 'three-pane.list' {
  66. '> main' { display = 'none' }
  67. }
  68. 'three-pane.detail' {
  69. '> aside' { display = 'none' }
  70. }
  71. // slot content from the caller: nesting refused (hybriel#270)
  72. 'three-pane > aside ul' {
  73. margin = '0'
  74. padding = '0'
  75. listStyle = 'none'
  76. }
  77. // slot content from the caller: nesting refused (hybriel#270)
  78. 'three-pane > aside li' { margin = '0' }
  79. // Keep the whole selector for selector list.
  80. 'three-pane > aside li a,
  81. three-pane > aside li > a:first-child' {
  82. display = 'flex'
  83. flexDirection = 'column'
  84. alignItems = 'stretch'
  85. justifyContent = 'center'
  86. gap = '.1rem'
  87. minHeight = 'var(--layout-tap)'
  88. padding = '.6rem .75rem'
  89. color = 'var(--color-text)'
  90. borderRadius = 'var(--radius-small)'
  91. }
  92. // slot content from the caller: nesting refused (hybriel#270)
  93. 'three-pane > aside li a' {
  94. hover {
  95. textDecoration = 'none'
  96. background = 'var(--color-surface)'
  97. }
  98. }
  99. // Keep the whole selector for selector list.
  100. 'three-pane > aside li a.selected,
  101. three-pane > aside li a[aria-current="page"]' {
  102. color = 'var(--color-text-strong)'
  103. background = 'var(--color-surface)'
  104. }
  105. // Keep the whole selector for selector list.
  106. 'three-pane > aside input,
  107. three-pane > aside select' {
  108. width = '100%'
  109. background = 'var(--color-background)'
  110. }
  111. // Keep the whole selector for pseudo-element.
  112. 'three-pane a.back::before' { content = '"‹ "' }
  113. // slot content from the caller: nesting refused (hybriel#270)
  114. 'three-pane > main > menu li' { margin = '0' }
  115. // slot content from the caller: nesting refused (hybriel#270)
  116. 'three-pane > main > menu button' {
  117. padding = '.4rem .7rem'
  118. hover { background = 'var(--color-background)' }
  119. }
  120. @media {
  121. minWidth = '60rem'
  122. // Keep the whole selector for selector list.
  123. 'three-pane > aside,
  124. three-pane.detail > aside' {
  125. display = 'block'
  126. minHeight = '0'
  127. overflowY = 'auto'
  128. padding = '1rem .75rem 2rem'
  129. background = 'var(--color-background-sunken)'
  130. }
  131. // Keep the whole selector for selector list.
  132. 'three-pane > main,
  133. three-pane.list > main' {
  134. display = 'block'
  135. minHeight = '0'
  136. overflowY = 'auto'
  137. padding = '1.5rem clamp(1.5rem, 4vw, 4rem) 3rem'
  138. }
  139. }
  140. }
  141. View {
  142. threePane { class = view slot }
  143. }

Branches

Latest commits

  • f036bab4search: format styles with nested rules and bare queriesmre
  • ef9a9d4asongs: format styles with nested rules and bare queriesmre
  • f22f9aacmain: format styles with nested rules and bare queriesmre
  • f56cd7c7Sync icons from 8176eb1 and verify mixed component sourcesmre
  • d56e5054Sync theme and shared tokens from layouts 17e0f03mre
  • b1362547Re-vendor to Hybriel set day35mre
  • 89e10f08Records: mission 002 rollback wordingmre
  • 9485dee7Records: mission 002 brief (live step)mre
  • 9ba68fe7Records: S1b reviewedmre
  • 193dfff1Records: S1 result, S1b startedmre
  • 028ed776Records: mission 001 continuation S1bmre
  • 1838d7e8Records: S1 startedmre
  • a43fca3fRecords: mission 001 decided pointsmre
  • 41773828Records: statusmre
  • a82c0805Records: mission 001 brief (Style form)mre
  • a4bce6d1Records: ticket push subscriptionmre
  • 14abde3bjukebox: records: Atlas's records moved to worldapi-conductor/archivemre
  • 0433e9a8jukebox: records: gitoria remote added and pushedmre
  • 1722d707jukebox: records: repo creation handed to Gitoriamre
  • b42e7dfbjukebox: conductor records (CONDUCTOR.md, STATUS.md), old STATUS archivedmre