feat(responsive): mobile polish — topbar, drawer, footer, tabs, notification dropdown
Unifies the breakpoint system and fixes cross-layer CSS bugs that kept the old mobile hide rules from ever taking effect. Breakpoints: - Document canonical xs/sm/md/lg/xl/2xl scale in variables.base.css - Replace 968px one-offs with 1024px (app-details, app-page-editor) - Make details tab-panel max-width responsive (min(70ch, 100%)) Topbar (< md): - Hide breadcrumb in components layer so cross-layer overrides actually win - Dock search icon alongside right-column icons via flex layout - Add xs (400px) tightening for hit-area preservation - Hide brand divider alongside hidden brand name - Switch hover states to theme-aware --app-dropdown-hover-background-color Mobile drawer: - Icon-bar now vertical like desktop (was horizontal top strip, effectively invisible) - Sidebar shifted 52px right so icon-bar and sidebar slide in as one 280px unit - Add breathing room above first nav item (20px top padding) List tabs: - Rewrite .app-list-tabs to horizontal scroll with hidden scrollbar, snap, and mask-image gradient fades; add initListTabs to scroll active into view - Register as runtime component in app-init.js List toolbar: - Stack wide controls (multi-select, search/text inputs) full-width below sm, keep compact controls at natural width Footer: - New dedicated app-footer.css with mobile-first stacking, border-top separator, theme-aware hover; remove redundant rules from app-shell.css Notification dropdown: - Width with min(360px, 100vw - 2rem) and min-width: 0 override global details > ul rule; switch to position: fixed below md so it hugs the viewport right edge instead of the non-rightmost bell button Content spacing: - Add padding-block-start to .app-main-content on mobile (was 0) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -90,4 +90,13 @@
|
||||
font-weight: var(--font-medium);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Breadcrumb is desktop-only chrome — the hamburger drawer owns navigation
|
||||
below md. Must live in the components layer to override .app-breadcrumb's
|
||||
own display:flex (cross-layer specificity does not apply). */
|
||||
@media (max-width: 767px) {
|
||||
.app-breadcrumb {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
|
||||
/* Inside the drawer, force single-column layout for any .app-details-container
|
||||
regardless of viewport width (the grid rule in app-details.css triggers on
|
||||
viewport ≥968px, which is wrong for a 720px drawer). Any page that uses the
|
||||
viewport ≥1024px, which is wrong for a 720px drawer). Any page that uses the
|
||||
standard details container gets stacked main + aside automatically. */
|
||||
.app-detail-drawer .app-details-container,
|
||||
.app-detail-drawer .app-details-container:has(> aside) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
}
|
||||
|
||||
.app-details-container > section > form [data-tab-panel] {
|
||||
max-width: 70ch;
|
||||
max-width: min(70ch, 100%);
|
||||
}
|
||||
|
||||
.app-details-container > section > form [data-tab-panel-wide] {
|
||||
@@ -137,11 +137,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 968px) {
|
||||
/* .app-details-container > section {
|
||||
padding: calc(var(--app-spacing) * 2) calc(var(--app-spacing) * 2)
|
||||
calc(var(--app-spacing) * 2) calc(var(--app-spacing) * 0);
|
||||
} */
|
||||
@media (min-width: 1024px) {
|
||||
.app-details-container:has(> aside) {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 2fr) minmax(0, 300px);
|
||||
|
||||
106
web/css/components/app-footer.css
Normal file
106
web/css/components/app-footer.css
Normal file
@@ -0,0 +1,106 @@
|
||||
@layer components {
|
||||
/* Site footer — utility nav with copyright, legal links, language switcher.
|
||||
Shared between default shell, login, and public page layouts. Mobile-first. */
|
||||
footer.site-footer {
|
||||
border-top: 1px solid var(--app-muted-border-color);
|
||||
padding-block: var(--app-spacing);
|
||||
padding-inline: var(--app-spacing);
|
||||
color: var(--app-muted-color);
|
||||
}
|
||||
|
||||
footer.site-footer > nav {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: calc(var(--app-spacing) * 0.5) var(--app-spacing);
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
footer.site-footer ul {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: calc(var(--app-spacing) * 0.25) calc(var(--app-spacing) * 0.75);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
footer.site-footer li {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* Reset Pico's zero-width-space before-marker on nav li. */
|
||||
footer.site-footer li::before {
|
||||
content: none;
|
||||
}
|
||||
|
||||
footer.site-footer a {
|
||||
color: var(--app-muted-color);
|
||||
text-decoration: none;
|
||||
padding-inline: calc(var(--app-spacing) * 0.25);
|
||||
padding-block: calc(var(--app-spacing) * 0.25);
|
||||
margin: 0;
|
||||
border-radius: var(--app-border-radius);
|
||||
transition:
|
||||
color var(--app-transition),
|
||||
background-color var(--app-transition);
|
||||
}
|
||||
|
||||
footer.site-footer a:hover {
|
||||
color: var(--app-color);
|
||||
background: color-mix(in srgb, var(--app-contrast) 6%, transparent);
|
||||
}
|
||||
|
||||
footer.site-footer a:focus-visible {
|
||||
outline: 2px solid var(--app-primary);
|
||||
outline-offset: -2px;
|
||||
color: var(--app-color);
|
||||
}
|
||||
|
||||
footer.site-footer small {
|
||||
font-size: var(--text-xs);
|
||||
line-height: var(--leading-tight);
|
||||
}
|
||||
|
||||
/* Language switcher (inline <select>) — compact, sits next to the links. */
|
||||
footer.site-footer select {
|
||||
margin: 0;
|
||||
padding: calc(var(--app-spacing) * 0.2) calc(var(--app-spacing) * 0.5);
|
||||
font-size: var(--text-xs);
|
||||
height: auto;
|
||||
min-height: 0;
|
||||
width: auto;
|
||||
background-position: right 0.5rem center;
|
||||
}
|
||||
|
||||
/* xs — stack link group and language group vertically, centered.
|
||||
Better readability than cramming both on one wrapped row. */
|
||||
@media (max-width: 576px) {
|
||||
footer.site-footer {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
footer.site-footer > nav {
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
gap: calc(var(--app-spacing) * 0.75);
|
||||
}
|
||||
|
||||
footer.site-footer ul {
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
/* Desktop — more breathing room on the sides. */
|
||||
@media (min-width: 768px) {
|
||||
footer.site-footer {
|
||||
padding-block: calc(var(--app-spacing) * 1.25);
|
||||
padding-inline: calc(var(--app-spacing) * 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,34 +1,98 @@
|
||||
@layer components {
|
||||
/* List page tab bar — horizontal filter tabs above data grids. */
|
||||
.app-list-tabs {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: var(--app-spacing);
|
||||
border-bottom: 1px solid var(--app-list-tabs-border);
|
||||
}
|
||||
/* List page tab bar — single-line horizontal scroll, matches .app-tabs pattern.
|
||||
The active tab is scrolled into view by initListTabs on mount. */
|
||||
.app-list-tabs {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
scroll-behavior: smooth;
|
||||
scroll-snap-type: x proximity;
|
||||
margin-bottom: var(--app-spacing);
|
||||
border-bottom: 1px solid var(--app-list-tabs-border);
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
.app-list-tabs button,
|
||||
.app-list-tabs a {
|
||||
background: transparent;
|
||||
border: 0;
|
||||
padding: 5px 10px 5px 10px;
|
||||
color: var(--app-list-tabs-muted);
|
||||
cursor: pointer;
|
||||
font-weight: var(--font-medium);
|
||||
border-bottom: 2px solid transparent;
|
||||
text-decoration: none;
|
||||
}
|
||||
.app-list-tabs::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.app-list-tabs button:hover,
|
||||
.app-list-tabs button:focus-visible,
|
||||
.app-list-tabs a:hover,
|
||||
.app-list-tabs a:focus-visible {
|
||||
color: var(--app-color);
|
||||
}
|
||||
.app-list-tabs button,
|
||||
.app-list-tabs a {
|
||||
background: transparent;
|
||||
border: 0;
|
||||
padding: 5px 10px 5px 10px;
|
||||
color: var(--app-list-tabs-muted);
|
||||
cursor: pointer;
|
||||
font-weight: var(--font-medium);
|
||||
border-bottom: 2px solid transparent;
|
||||
text-decoration: none;
|
||||
flex-shrink: 0;
|
||||
white-space: nowrap;
|
||||
scroll-snap-align: start;
|
||||
}
|
||||
|
||||
.app-list-tabs button.is-active,
|
||||
.app-list-tabs a.is-active {
|
||||
color: var(--app-color);
|
||||
border-color: var(--app-list-tabs-active);
|
||||
}
|
||||
.app-list-tabs button:hover,
|
||||
.app-list-tabs button:focus-visible,
|
||||
.app-list-tabs a:hover,
|
||||
.app-list-tabs a:focus-visible {
|
||||
color: var(--app-color);
|
||||
}
|
||||
|
||||
.app-list-tabs button.is-active,
|
||||
.app-list-tabs a.is-active {
|
||||
color: var(--app-color);
|
||||
border-color: var(--app-list-tabs-active);
|
||||
}
|
||||
|
||||
/* Gradient fade masks — toggled by initListTabs via has-overflow/at-start/at-end.
|
||||
Uses mask-image on the scroll container itself, no wrapper needed. */
|
||||
.app-list-tabs.has-overflow:not(.at-start):not(.at-end) {
|
||||
mask-image: linear-gradient(
|
||||
to right,
|
||||
transparent 0,
|
||||
black 24px,
|
||||
black calc(100% - 24px),
|
||||
transparent 100%
|
||||
);
|
||||
-webkit-mask-image: linear-gradient(
|
||||
to right,
|
||||
transparent 0,
|
||||
black 24px,
|
||||
black calc(100% - 24px),
|
||||
transparent 100%
|
||||
);
|
||||
}
|
||||
|
||||
.app-list-tabs.has-overflow.at-start:not(.at-end) {
|
||||
mask-image: linear-gradient(
|
||||
to right,
|
||||
black 0,
|
||||
black calc(100% - 24px),
|
||||
transparent 100%
|
||||
);
|
||||
-webkit-mask-image: linear-gradient(
|
||||
to right,
|
||||
black 0,
|
||||
black calc(100% - 24px),
|
||||
transparent 100%
|
||||
);
|
||||
}
|
||||
|
||||
.app-list-tabs.has-overflow:not(.at-start).at-end {
|
||||
mask-image: linear-gradient(
|
||||
to right,
|
||||
transparent 0,
|
||||
black 24px,
|
||||
black 100%
|
||||
);
|
||||
-webkit-mask-image: linear-gradient(
|
||||
to right,
|
||||
transparent 0,
|
||||
black 24px,
|
||||
black 100%
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,4 +93,33 @@
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* xs — only the "wide" controls stack full-width so they don't overflow the
|
||||
grid; compact controls (page-size, small buttons) keep their natural width. */
|
||||
@media (max-width: 576px) {
|
||||
.app-list-toolbar {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.app-list-toolbar > .multi-select,
|
||||
.app-list-toolbar > label:has(input[type="search"]),
|
||||
.app-list-toolbar > label:has(input[type="text"]),
|
||||
.app-list-toolbar > .app-field:has(input[type="search"]),
|
||||
.app-list-toolbar > .app-field:has(input[type="text"]),
|
||||
.app-list-toolbar > .app-field:has(textarea) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.app-list-toolbar > .multi-select .multi-select-header {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.app-list-toolbar
|
||||
> :is(.app-field, label):has(input[type="search"]) input,
|
||||
.app-list-toolbar
|
||||
> :is(.app-field, label):has(input[type="text"]) input,
|
||||
.app-list-toolbar > .app-field:has(textarea) textarea {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
@media (min-width: 968px) {
|
||||
@media (min-width: 1024px) {
|
||||
.app-page-action-card {
|
||||
position: sticky;
|
||||
top: calc(var(--app-spacing) * 4);
|
||||
|
||||
Reference in New Issue
Block a user