add CSS migration foundation and screenshot tooling (Phase 0)
- CSS file structure with @layer declaration (reset, layout, components, utilities, overrides) - Layout primitives: .stack, .cluster, .row, .auto-grid, .container-page, .with-sidebar, .center - mix screenshots task using Playwright for visual regression testing - Golden baseline captured (10 pages x 4 breakpoints = 40 screenshots) - No visual changes — new CSS not wired into any layout yet Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
69
assets/css/shop/layout.css
Normal file
69
assets/css/shop/layout.css
Normal file
@@ -0,0 +1,69 @@
|
||||
/* Layout primitives — composable building blocks for page structure.
|
||||
Each primitive does one layout job well. Combine them freely. */
|
||||
|
||||
@layer layout {
|
||||
/* Vertical stack with consistent gap */
|
||||
.stack {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--stack-gap, var(--space-md));
|
||||
}
|
||||
|
||||
/* Horizontal flex-wrap cluster for tags, pills, badges */
|
||||
.cluster {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--cluster-gap, var(--space-sm));
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* Horizontal flex row, no wrap — navbars, toolbars, inline groups */
|
||||
.row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--row-gap, var(--space-sm));
|
||||
}
|
||||
|
||||
/* Intrinsic responsive grid — items wrap naturally without breakpoints */
|
||||
.auto-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(
|
||||
auto-fill,
|
||||
minmax(min(var(--auto-grid-min, 16rem), 100%), 1fr)
|
||||
);
|
||||
gap: var(--auto-grid-gap, var(--space-md));
|
||||
}
|
||||
|
||||
/* Centered max-width container */
|
||||
.container-page {
|
||||
width: 100%;
|
||||
max-width: var(--t-layout-max-width, 1400px);
|
||||
margin-inline: auto;
|
||||
padding-inline: var(--space-md);
|
||||
}
|
||||
|
||||
/* Main content + sidebar layout */
|
||||
.with-sidebar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--sidebar-gap, var(--space-xl));
|
||||
|
||||
& > :first-child {
|
||||
flex-grow: 999;
|
||||
flex-basis: 0;
|
||||
min-width: 60%;
|
||||
}
|
||||
|
||||
& > :last-child {
|
||||
flex-grow: 1;
|
||||
flex-basis: var(--sidebar-width, 20rem);
|
||||
}
|
||||
}
|
||||
|
||||
/* Flex center — for centering content both axes */
|
||||
.center {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user