gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commite46fa222e46fa222Own shell feedback styles and retain documented selector formsmree46fa222/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 (hybriel#270)
  48. 'list-first > aside ul' {
  49. margin = '0'
  50. padding = '0'
  51. listStyle = 'none'
  52. }
  53. // slot content from the caller: nesting refused (hybriel#270)
  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 (hybriel#270)
  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

  • e46fa222Own shell feedback styles and retain documented selector formsmre
  • c26084c4Reference repository list styles and nest its breakpointmre
  • f3e196b5Document Markdown direct-child selector remaindersmre
  • 70597528Reference pull list rules and explain runtime class predicatesmre
  • 1ce7ac24Reference ticket row and feedback styles from its Viewmre
  • 10cdf54bGive organization repository rows their own Style referencesmre
  • 0d019521Document shared class selectors in the styles-only filemre
  • c67404a7Scope token labels and feedback through the token Viewmre
  • 944e3dabScope key names, fingerprints and errors to the keys Viewmre
  • 7bcf7bc2Nest repo navigation media rules and document selector gapsmre
  • 46a76272Reference release row styles from the Viewmre
  • a383f428Tie README definition and path styles to its own Viewmre
  • a90812ffConsolidate add-code styles under its existing View idmre
  • 89107a3eDocument the index direct-child selector remaindermre
  • 07403362Scope reply form layout through the component form rulemre
  • 097c52baStyle the login error through its View idmre
  • c6d9c86aOwn the not-found code rule in its componentmre
  • 055424c2Record W61 replacement theme gates, sidebar repro and baselinemre
  • 2ed09441Use layouts theme 17e0f03 for W61 compatibilitymre
  • b8609a91Merge branch 'main' into w61-stylemre