gitoria

layouts

All repositories: gitoria

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

1.7 KB

  1. // content-first.hl — SHELL 1, the regular app: a sidebar and the main content (docs/layouts/content-first.md).
  2. // Phone: the main content; the sidebar is the overlay the header's toggle opens. 60rem+: sidebar and main side by side,
  3. // both inside the centred content column (--layout-column) the header's contents are flush with.
  4. //
  5. // ContentFirst {
  6. // Sidebar { nav { a { href = "/" "Home" } } }
  7. // main { h1 { "Title" } p { "…" } }
  8. // }
  9. //
  10. // Without a Sidebar, or with `Sidebar { desktop = "false" }`, main takes the whole column on desktop.
  11. slot = null
  12. Style {
  13. contentFirst {
  14. display = 'block'
  15. paddingInline = 'max(var(--layout-gutter), calc((100% - var(--layout-column)) / 2))'
  16. paddingTop = '1rem'
  17. paddingBottom = '3rem'
  18. @media {
  19. minWidth = '60rem'
  20. display = 'grid'
  21. gridTemplateColumns = 'var(--layout-sidebar) minmax(0, 1fr)'
  22. gap = '3rem'
  23. alignItems = 'start'
  24. paddingTop = '1.5rem'
  25. }
  26. }
  27. // Keep the whole selector for :has condition.
  28. // No nested form for this functional/popup pseudo on day44 (v08/v11).
  29. 'content-first:not(:has(> app-sidebar:not(.mobile-only)))' {
  30. @media {
  31. minWidth = '60rem'
  32. gridTemplateColumns = 'minmax(0, 1fr)'
  33. }
  34. }
  35. // Caller slot content is unknown here, so its selectors must be whole.
  36. // Caller slot content must keep whole selectors (layouts#8; probe v23).
  37. 'content-first > main' {
  38. display = 'block'
  39. minWidth = '0'
  40. }
  41. @media {
  42. minWidth = '60rem'
  43. // Caller slot content must keep whole selectors (layouts#8; probe v23).
  44. 'content-first > app-sidebar' {
  45. position = 'sticky'
  46. top = 'calc(var(--layout-header) + 1.5rem)'
  47. maxHeight = 'calc(100dvh - var(--layout-header) - 3rem)'
  48. overflowY = 'auto'
  49. marginLeft = '-.75rem'
  50. }
  51. }
  52. }
  53. View {
  54. contentFirst { slot }
  55. }

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