Fix card grid layout on narrow viewports with tree sidebar
The tree-layout used align-items: flex-start for the desktop sidebar, but when switching to column direction at <900px this prevented children from stretching to full width. Add align-items: stretch in the media query and lower grid minmax values so cards use 2+ columns. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -190,11 +190,23 @@
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* ── Sidebar eats into card space — allow 2-col with smaller minmax ── */
|
||||
|
||||
.tree-content .displays-grid,
|
||||
.tree-content .devices-grid {
|
||||
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
|
||||
}
|
||||
|
||||
.tree-content .templates-grid {
|
||||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||
}
|
||||
|
||||
/* ── Responsive: stack on narrow screens ── */
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.tree-layout {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
@@ -252,4 +264,5 @@
|
||||
padding: 4px;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user