fix(album-card-lite): contain: paint on cover-wrap forces clip
Third pass at the SearchView > Albums overlap bug. `overflow: hidden` + `position: absolute; inset: 0` on the img weren't enough to keep some artwork inside the 220x220 box — the `cachedSrc` action applies `transform: translateZ(0)` to the img under HW acceleration (the WebKit 2.50+ texture-eviction workaround) and the composited layer that creates can escape the parent's clip rect in certain layouts. `contain: paint` on the parent forces it to be a paint containment boundary at the rendering-layer level — anything painted by descendants, composited or not, gets clipped to this box. cc
This commit is contained in:
1 file changed
+10
@@ -196,6 +196,16 @@
|
||||
background: var(--bg-tertiary);
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
/* `overflow: hidden` + `position: absolute; inset: 0` on the img
|
||||
wasn't enough to keep some portrait-aspect Plex/Qobuz artwork
|
||||
inside the box — the cachedSrc action applies
|
||||
`transform: translateZ(0)` to the img under HW acceleration,
|
||||
which can promote it to its own composited layer and (per a
|
||||
known WebKit quirk) sometimes escape the parent's clip rect.
|
||||
`contain: paint` forces the parent to be a paint containment
|
||||
boundary, so any painted output from children — composited or
|
||||
not — gets clipped to this box. */
|
||||
contain: paint;
|
||||
}
|
||||
|
||||
/* Qobuz-style hover overlay: solid dark scrim covers the whole cover,
|
||||
|
||||
Reference in new issue
Block a user