Make admin sub-pages responsive on mobile
Below 768px, multi-column layouts that previously forced horizontal scrolling now collapse to a single column: - Filter/search bar wraps with full-width controls (selects no longer use fixed inline widths) - Asset edit form grids (2fr/3/4 columns) stack vertically - Asset detail grid and item visuals stack - Page headers stack title above actions Inline grid-template styles in items.html were extracted into reusable .form-grid classes so the media query can override them. Data tables keep scrolling within their card wrapper as before. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
8e5eb387c5
commit
3d2507616d
2 files changed
+54
-9
No files matched your search
@@ -264,6 +264,12 @@ body {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Filter dropdowns size to content on desktop, full-width on mobile */
|
||||
.filter-select {
|
||||
flex: 0 1 auto;
|
||||
min-width: 160px;
|
||||
}
|
||||
|
||||
.search-input-wrapper svg {
|
||||
position: absolute;
|
||||
left: 0.75rem;
|
||||
@@ -361,6 +367,16 @@ body {
|
||||
gap: 0.35rem;
|
||||
}
|
||||
|
||||
/* Reusable responsive form grids (replace inline grid-template styles) */
|
||||
.form-grid {
|
||||
display: grid;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
.form-grid--2-1 { grid-template-columns: 2fr 1fr; }
|
||||
.form-grid--2 { grid-template-columns: 1fr 1fr; }
|
||||
.form-grid--3 { grid-template-columns: repeat(3, 1fr); }
|
||||
.form-grid--4 { grid-template-columns: repeat(4, 1fr); }
|
||||
|
||||
/* Asset Detail Grid */
|
||||
.detail-grid {
|
||||
display: grid;
|
||||
@@ -1184,5 +1200,34 @@ tr:last-child .actions-dropdown-menu {
|
||||
margin-left: 0;
|
||||
padding: 1.5rem 1.25rem;
|
||||
}
|
||||
|
||||
/* Collapse all multi-column layouts to a single column */
|
||||
.detail-grid,
|
||||
.item-visuals,
|
||||
.form-grid--2-1,
|
||||
.form-grid--2,
|
||||
.form-grid--3,
|
||||
.form-grid--4 {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
/* Search & filter bar stacks vertically with full-width controls */
|
||||
.filter-bar {
|
||||
flex-wrap: wrap;
|
||||
align-items: stretch;
|
||||
}
|
||||
.filter-bar > * {
|
||||
width: 100%;
|
||||
}
|
||||
.filter-bar .filter-select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Page header: title and actions stack instead of overflowing */
|
||||
.page-header {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user