gitoria

layouts

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit3e389b833e389b83main-menu: nest child and compound selectors in Stylemre3e389b83/theme/shell/list-first.hl

3.1 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. '> aside' {
  15. display = 'block'
  16. padding = '.5rem calc(var(--layout-gutter) - .75rem) 2rem'
  17. }
  18. '> main' {
  19. display = 'block'
  20. minWidth = '0'
  21. padding = '1rem var(--layout-gutter) 3rem'
  22. }
  23. 'a.back' {
  24. display = 'inline-flex'
  25. alignItems = 'center'
  26. minHeight = 'var(--layout-tap)'
  27. marginBottom = '1rem'
  28. fontWeight = '600'
  29. @media {
  30. minWidth = '60rem'
  31. display = 'none'
  32. }
  33. }
  34. @media {
  35. minWidth = '60rem'
  36. display = 'grid'
  37. gridTemplateColumns = 'var(--layout-list) minmax(0, 1fr)'
  38. height = 'calc(100dvh - var(--layout-header))'
  39. }
  40. }
  41. 'list-first.list' {
  42. '> main' { display = 'none' }
  43. }
  44. 'list-first.detail' {
  45. '> aside' { display = 'none' }
  46. }
  47. // slot content from the caller: nesting refused (repro LY7/review/repro)
  48. 'list-first > aside ul' {
  49. margin = '0'
  50. padding = '0'
  51. listStyle = 'none'
  52. }
  53. // slot content from the caller: nesting refused (repro LY7/review/repro)
  54. 'list-first > aside li' { margin = '0' }
  55. // Keep the whole selector for selector list.
  56. 'list-first > aside li a,
  57. list-first > aside li > a:first-child' {
  58. display = 'flex'
  59. flexDirection = 'column'
  60. alignItems = 'stretch'
  61. justifyContent = 'center'
  62. gap = '.1rem'
  63. minHeight = 'var(--layout-tap)'
  64. padding = '.6rem .75rem'
  65. color = 'var(--color-text)'
  66. borderRadius = 'var(--radius-small)'
  67. }
  68. // slot content from the caller: nesting refused (repro LY7/review/repro)
  69. 'list-first > aside li a' {
  70. hover {
  71. textDecoration = 'none'
  72. background = 'var(--color-surface)'
  73. }
  74. }
  75. // Keep the whole selector for selector list.
  76. 'list-first > aside li a.selected,
  77. list-first > aside li a[aria-current="page"]' {
  78. color = 'var(--color-text-strong)'
  79. background = 'var(--color-surface)'
  80. }
  81. // Keep the whole selector for selector list.
  82. 'list-first > aside input,
  83. list-first > aside select' {
  84. width = '100%'
  85. background = 'var(--color-background)'
  86. }
  87. // Keep the whole selector for pseudo-element.
  88. 'list-first a.back::before' { content = '"‹ "' }
  89. @media {
  90. minWidth = '60rem'
  91. // Keep the whole selector for selector list.
  92. 'list-first > aside,
  93. list-first.detail > aside' {
  94. display = 'block'
  95. minHeight = '0'
  96. overflowY = 'auto'
  97. padding = '1rem .75rem 2rem'
  98. background = 'var(--color-background-sunken)'
  99. }
  100. // Keep the whole selector for selector list.
  101. 'list-first > main,
  102. list-first.list > main' {
  103. display = 'block'
  104. minHeight = '0'
  105. overflowY = 'auto'
  106. padding = '1.5rem clamp(1.5rem, 5vw, 5rem) 3rem'
  107. }
  108. }
  109. }
  110. View {
  111. listFirst { class = view slot }
  112. }

Branches

Latest commits

  • 3e389b83main-menu: nest child and compound selectors in Stylemre
  • 05413975list-first: nest child and compound selectors in Stylemre
  • c545b642content-first: nest child and compound selectors in Stylemre
  • eae2be7aapp-sidebar: nest child selectors and document caller-slot gapmre
  • 69c9f784Record LY7 slot nesting blocker and minimal repromre
  • b1d4f379app-header: nest child and compound selectors in Stylemre
  • 6385ff8eRecord LY7 style formatting proof and review statusmre
  • 0100f51etracker-demo: format Style with nested rules and bare mediamre
  • 5f82554enotes-demo: format Style with nested rules and bare mediamre
  • 3dc27d78mail-demo: format Style with nested rules and bare mediamre
  • cf9648afhome: format Style with nested rules and bare mediamre
  • 846a6242user-menu: format Style with nested rules and bare mediamre
  • 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