WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
322214
REGRESSION (macOS 26): inset box-shadow with large spread on a wrapped inline element paints outside the element as full-width bands
https://bugs.webkit.org/show_bug.cgi?id=322214
Summary
REGRESSION (macOS 26): inset box-shadow with large spread on a wrapped inline...
auron
Reported
2026-08-20 14:19:54 PDT
Created
attachment 481122
[details]
highlight not getting clipped On macOS 26 Safari 26.5.2 (21624.2.5.11.8), an inline element with `box-shadow: inset 0 0 0 100em <color>` that wraps onto multiple lines paints the shadow far outside the element: a solid band of the shadow color is drawn across the full width of the page at the height of each line box the span occupies. Per CSS Backgrounds & Borders, inset shadows are painted inside the padding box only, so with a background-color of the same color the shadow should be completely invisible. This did not occur on macOS 15 / earlier Safari — the same page has rendered correctly for years. Chrome and Firefox on the same machine render it correctly today. STEPS TO REPRODUCE 1. Open the attached reduced test case (webkit-inset-shadow-repro.html). 2. Compare Case 1/2 (inline span, wraps multiple lines) with Case 3 (identical shadow on an inline-block). EXPECTED: the highlight color stays confined to the span in all cases. ACTUAL: Cases 1 and 2 draw full-page-width color bands at each line of the span (screenshot attached). Case 3 renders correctly. REAL-WORLD IMPACT: background-color + large-spread inset box-shadow is a widely used pattern to make text highlights survive printing (browsers strip backgrounds in print but keep box-shadows). Our handoff web app uses it for highlighting; on macOS 26 every highlighted line floods the full screen width, obscuring adjacent patient-data columns. POSSIBLY RELATED:
bug 250059
("box-shadow does not paint correctly on inline elements", fixed in
258923@main
) touched inline shadow painting. Timing also coincides with the CSSWG resolution that inset box-shadow spread should render "like an inner border" (w3c/csswg-drafts, Nov 2025), in case spec-alignment work in this area introduced the regression.
Attachments
highlight not getting clipped
(261.19 KB, image/png)
2026-08-20 14:19 PDT
,
auron
no flags
Details
webkit-inset-shadow-bug.html
(2.11 KB, text/html)
2026-08-28 19:49 PDT
,
auron
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2026-08-23 16:58:24 PDT
<
rdar://problem/185651318
>
alan
Comment 2
2026-08-28 13:35:27 PDT
Could you attach the test reduction, please? Thank you.
auron
Comment 3
2026-08-28 19:49:17 PDT
Created
attachment 481206
[details]
webkit-inset-shadow-bug.html requested bug reproduction
auron
Comment 4
2026-08-28 19:50:12 PDT
(In reply to alan from
comment #2
)
> Could you attach the test reduction, please? Thank you.
done! please see attachment
alan
Comment 5
2026-08-29 06:46:31 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/72774
EWS
Comment 6
2026-08-31 05:53:53 PDT
Committed
320150@main
(60dff96f744e): <
https://commits.webkit.org/320150@main
> Reviewed commits have been landed. Closing PR #72774 and removing active labels.
Anne van Kesteren
Comment 7
2026-10-31 00:37:54 PDT
Submitted web-platform-tests pull request:
https://github.com/web-platform-tests/wpt/pull/64434
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug