gitoria

layouts

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit4d58708c4d58708cthree-pane: format Style with nested rules and bare mediamre4d58708c/theme/shell/three-pane.hl

4.4 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. // No language form for the existing class or attribute compound.
  17. 'a.back' {
  18. display = 'inline-flex'
  19. alignItems = 'center'
  20. minHeight = 'var(--layout-tap)'
  21. marginBottom = '1rem'
  22. fontWeight = '600'
  23. @media {
  24. minWidth = '60rem'
  25. display = 'none'
  26. }
  27. }
  28. @media {
  29. minWidth = '60rem'
  30. display = 'grid'
  31. gridTemplateColumns = 'var(--layout-sidebar) var(--layout-list) minmax(0, 1fr)'
  32. height = 'calc(100dvh - var(--layout-header))'
  33. }
  34. }
  35. // No language form for direct-child combinator.
  36. 'three-pane > aside' {
  37. display = 'block'
  38. padding = '.5rem calc(var(--layout-gutter) - .75rem) 2rem'
  39. }
  40. // No language form for direct-child combinator.
  41. 'three-pane > main' {
  42. display = 'block'
  43. minWidth = '0'
  44. padding = '1rem var(--layout-gutter) 3rem'
  45. }
  46. // No language form for direct-child combinator, class on the component root.
  47. 'three-pane.list > main' { display = 'none' }
  48. // No language form for direct-child combinator, class on the component root.
  49. 'three-pane.detail > aside' { display = 'none' }
  50. // No language form for direct-child combinator.
  51. 'three-pane > aside ul' {
  52. margin = '0'
  53. padding = '0'
  54. listStyle = 'none'
  55. }
  56. // No language form for direct-child combinator.
  57. 'three-pane > aside li' { margin = '0' }
  58. // No language form for selector list, direct-child combinator.
  59. 'three-pane > aside li a,
  60. three-pane > aside li > a:first-child' {
  61. display = 'flex'
  62. flexDirection = 'column'
  63. alignItems = 'stretch'
  64. justifyContent = 'center'
  65. gap = '.1rem'
  66. minHeight = 'var(--layout-tap)'
  67. padding = '.6rem .75rem'
  68. color = 'var(--color-text)'
  69. borderRadius = 'var(--radius-small)'
  70. }
  71. // No language form for direct-child combinator.
  72. 'three-pane > aside li a' {
  73. hover {
  74. textDecoration = 'none'
  75. background = 'var(--color-surface)'
  76. }
  77. }
  78. // No language form for selector list, direct-child combinator.
  79. 'three-pane > aside li a.selected,
  80. three-pane > aside li a[aria-current="page"]' {
  81. color = 'var(--color-text-strong)'
  82. background = 'var(--color-surface)'
  83. }
  84. // No language form for selector list, direct-child combinator.
  85. 'three-pane > aside input,
  86. three-pane > aside select' {
  87. width = '100%'
  88. background = 'var(--color-background)'
  89. }
  90. // No language form for pseudo-element.
  91. 'three-pane a.back::before' { content = '"‹ "' }
  92. // No language form for direct-child combinator.
  93. 'three-pane > main > menu' {
  94. position = 'sticky'
  95. top = 'var(--layout-header)'
  96. zIndex = '2'
  97. display = 'flex'
  98. flexWrap = 'wrap'
  99. gap = '.25rem'
  100. margin = '0 0 1.25rem'
  101. padding = '.3rem'
  102. listStyle = 'none'
  103. background = 'var(--color-background-sunken)'
  104. borderRadius = 'var(--radius-large)'
  105. @media {
  106. minWidth = '60rem'
  107. top = '0'
  108. }
  109. }
  110. // No language form for direct-child combinator.
  111. 'three-pane > main > menu li' { margin = '0' }
  112. // No language form for direct-child combinator.
  113. 'three-pane > main > menu button' {
  114. padding = '.4rem .7rem'
  115. hover { background = 'var(--color-background)' }
  116. }
  117. @media {
  118. minWidth = '60rem'
  119. // No language form for direct-child combinator.
  120. 'three-pane > app-sidebar' {
  121. minHeight = '0'
  122. overflowY = 'auto'
  123. padding = '1rem .75rem 2rem'
  124. }
  125. // No language form for selector list, direct-child combinator.
  126. 'three-pane > aside,
  127. three-pane.detail > aside' {
  128. display = 'block'
  129. minHeight = '0'
  130. overflowY = 'auto'
  131. padding = '1rem .75rem 2rem'
  132. background = 'var(--color-background-sunken)'
  133. }
  134. // No language form for selector list, direct-child combinator.
  135. 'three-pane > main,
  136. three-pane.list > main' {
  137. display = 'block'
  138. minHeight = '0'
  139. overflowY = 'auto'
  140. padding = '1.5rem clamp(1.5rem, 4vw, 4rem) 3rem'
  141. }
  142. }
  143. }
  144. View {
  145. threePane { class = view slot }
  146. }

Branches

Latest commits

  • 4d58708cthree-pane: format Style with nested rules and bare mediamre
  • 0bbfc553main-menu: format Style with nested rules and bare mediamre
  • 7755199dlist-first: format Style with nested rules and bare mediamre
  • 35199303content-first: format Style with nested rules and bare mediamre
  • 00f6e698app-sidebar: format Style with nested rules and bare mediamre
  • bb2f29c9app-header: format Style with nested rules and bare mediamre
  • 3aca2d7fSync components from 8176eb1 with reviewed nested stylesmre
  • 87e4003dRe-vendor layouts to Hybriel set day35mre
  • d8628cfflayouts: a startup error prints its message before exit 1 (hybriel#247)mre
  • 180fd76elayouts: MdEditor from components 59704ce (text on the clipboard always pastes, a file manager copy still attaches; pipe rows; empty Table-button table; tickets#49, notes#5)mre
  • a3eda8afRe-vendor Hybriel master 7a684920 (binary 74ab3715): plugins whole, startup fault exits 1; files-upload gate 340/0mre
  • 025d5880WIP re-vendor Hybriel set-day27b (a9712e61, master f5ff97bf): plugins whole, startup fault exits 1; NOT deployable: files-upload emit refused (see .scratch/rv27-upload)mre
  • 42183a71Merge sb3-standby: layouts deploys through its standbymre
  • 408de1f2layouts: no jobs switch needed in the standbymre
  • 0b85f57elayouts: a standby container (port 45019, profile standby); deploy hands over through standby-swap.sh without a gapmre
  • 31e40b8bMerge dm3-media: range handling in the layouts media routemre
  • 856dcacbLayouts media route: read suffix ranges and ignore range lists and garbage, like the components route (the layouts copy still answered 416 for the last bytes)mre
  • ad5056eaMerge dm3-sync: components re-sync to c2834ddmre
  • 740e2abeRe-sync the components copy to c2834dd: media player fixes (state after a queue pick, cover-less audio, accessibility labels)mre
  • 7fe103bbMerge mp-player: the media player showcase pagemre