fix: serp thumbnails shrink to fit grid cell (MPS-24 lane layout)
shop.printableprompts.com's lanes layout looked broken: each lane rendered a single giant product card spanning the entire viewport. Cause: img.serp-thumbnail had no width constraint, so a 1080px-natural thumbnail expanded its grid cell to 1080px, collapsing the auto-fit 'repeat(auto-fit, minmax(160px, 1fr))' grid to a one-column layout. Per CLAUDE.md CSS Media Sizing rule, use width: auto + max-width: 100% (never width: 100% with max-height). Adds height: auto + display: block to kill inline-image whitespace. Affects every page that renders .serp-thumbnail (home, shop, search, tag detail) — printableprompts had pixel-large thumbnails so it surfaced there first; other shops with smaller thumbs were getting away with the lack of constraint.
This commit is contained in:
parent
28ffee6c8c
commit
e284f88923
1 changed files with 9 additions and 0 deletions
|
|
@ -1355,6 +1355,15 @@ div.serp-item:hover {
|
|||
}
|
||||
|
||||
img.serp-thumbnail {
|
||||
/* width: auto + max-width: 100% per CLAUDE.md CSS Media Sizing:
|
||||
lets the image shrink to fit its grid cell without forcing the
|
||||
cell to expand to the image's natural width (which on
|
||||
printableprompts is 1080px+ and was collapsing the auto-fit
|
||||
grid to a single full-viewport column). */
|
||||
width: auto;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
display: block;
|
||||
border-radius: var(--radius-sm, 4px);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue