File tree Expand file tree Collapse file tree 5 files changed +19
-2
lines changed
Expand file tree Collapse file tree 5 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 1010 "Segoe UI" ,
1111 sans-serif;
1212}
13+
14+ /* Safari: stabilize drop-shadow during scroll */
15+ [class *= "drop-shadow-effective" ] {
16+ will-change : filter;
17+ }
Original file line number Diff line number Diff line change @@ -293,6 +293,12 @@ function SectionBoxVsDrop() {
293293 < code > filter: drop-shadow()</ code > — it's the only option that follows
294294 non-rectangular shapes.
295295 </ p >
296+ < p >
297+ < strong > Safari tip:</ strong > Add < code > will-change: filter</ code > to
298+ elements using < code > drop-shadow()</ code > to prevent rendering
299+ glitches during scroll. This promotes the element to its own
300+ compositing layer.
301+ </ p >
296302 </ div >
297303
298304 < div className = "prose" style = { { marginTop : 32 } } >
Original file line number Diff line number Diff line change @@ -28,7 +28,9 @@ function ComparisonColumn({
2828 className = "comparison-card"
2929 style = { {
3030 boxShadow : item . boxShadow ,
31- filter : item . filter
31+ filter : item . filter ,
32+ // Safari: stabilizes drop-shadow during scroll
33+ willChange : item . filter ? "filter" : undefined
3234 } }
3335 >
3436 < span > { item . name } </ span >
Original file line number Diff line number Diff line change @@ -339,7 +339,10 @@ const dropShadow = toDropShadow(shadow${colorArg})`
339339 < div className = "playground-preview" >
340340 < div
341341 className = "playground-card"
342- style = { { filter : dropShadowCSS } }
342+ style = { {
343+ filter : dropShadowCSS ,
344+ willChange : "filter" // Safari: stabilizes drop-shadow during scroll
345+ } }
343346 />
344347 </ div >
345348 </ div >
Original file line number Diff line number Diff line change @@ -1332,6 +1332,7 @@ body {
13321332.glow-btn-filter {
13331333 box-shadow : none;
13341334 filter : var (--btn-filter );
1335+ will-change : filter; /* Safari: stabilizes drop-shadow during scroll */
13351336}
13361337
13371338.glow-btn : hover {
You can’t perform that action at this time.
0 commit comments