layout.module.css 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* Modern Grid-based Layout System */
  2. .appGrid {
  3. display: grid;
  4. grid-template-columns: 16rem 1fr;
  5. grid-template-rows: 1fr auto;
  6. grid-template-areas:
  7. "sidebar main"
  8. "sidebar footer";
  9. min-height: 100vh;
  10. width: 100vw;
  11. overflow-x: hidden;
  12. }
  13. .sidebar {
  14. grid-area: sidebar;
  15. position: sticky;
  16. top: 0;
  17. height: 100vh;
  18. overflow-y: auto;
  19. border-right: 1px solid var(--color-border);
  20. background-color: var(--color-card);
  21. z-index: 9999;
  22. pointer-events: auto;
  23. }
  24. .main {
  25. grid-area: main;
  26. min-height: 100vh;
  27. max-width: calc(100vw - 16rem);
  28. overflow-x: hidden;
  29. background-color: var(--color-background);
  30. isolation: isolate;
  31. }
  32. .footer {
  33. grid-area: footer;
  34. min-height: 3rem;
  35. }
  36. /* Ensure sidebar is always interactive */
  37. .sidebar * {
  38. pointer-events: auto;
  39. }
  40. /* Responsive: Stack on mobile */
  41. @media (max-width: 768px) {
  42. .appGrid {
  43. grid-template-columns: 1fr;
  44. grid-template-rows: auto 1fr auto;
  45. grid-template-areas:
  46. "sidebar"
  47. "main"
  48. "footer";
  49. }
  50. .sidebar {
  51. position: relative;
  52. height: auto;
  53. }
  54. }