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
304635
Web Inspector: CSS nesting + @media display incorrect within Styles inspector.
https://bugs.webkit.org/show_bug.cgi?id=304635
Summary
Web Inspector: CSS nesting + @media display incorrect within Styles inspector.
Nilesh Prajapati
Reported
2025-12-23 00:57:46 PST
Created
attachment 477828
[details]
Screenshot of styles panel identifying the issue. When nesting @media within an element id or class, the Inspect Element styles panel displays incorrect information, making it unusable for debugging styling issues. I have attached a Codepen example and screenshot of the issue.
https://codepen.io/nileshprajapati/pen/YPzaZem
The following bug creates a ripple effect on the style panel after nesting @media. This results in additional CSS being added that’s misaligned, causing an offset in the source map that continues to mess up with the next CSS declarations.
Attachments
Screenshot of styles panel identifying the issue.
(119.58 KB, image/png)
2025-12-23 00:57 PST
,
Nilesh Prajapati
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2025-12-30 00:58:11 PST
<
rdar://problem/167326791
>
Nilesh Prajapati
Comment 2
2026-03-20 02:16:18 PDT
Could you please provide an update on this bug and confirm that it has been acknowledged and that any fixes are planned?
Nilesh Prajapati
Comment 3
2026-05-07 01:42:45 PDT
Update: An additional Codepen example of nesting does not display correctly in the style inspector when using @container. The Codepen demo shows both methods of CSS with and without CSS nesting. - Without using CSS nesting, the demo works perfectly with the Styles Inspector. - Using CSS nesting, the demo breaks the Styles Inspector.
https://codepen.io/editor/nileshprajapati/pen/019e017d-e216-7c0b-a110-e72543583586
I have also updated the previous demo (@media) to show a version without using CSS nesting (Currently commented out). Both demo examples have the same issue.
Razvan Caliman
Comment 4
2026-05-27 06:11:19 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/65774
Razvan Caliman
Comment 5
2026-06-03 08:38:56 PDT
***
Bug 290043
has been marked as a duplicate of this bug. ***
Alexey Proskuryakov
Comment 6
2026-09-03 10:22:15 PDT
***
Bug 323181
has been marked as a duplicate of this bug. ***
Alexey Proskuryakov
Comment 7
2026-09-03 10:25:00 PDT
***
Bug 279401
has been marked as a duplicate of this bug. ***
Alexey Proskuryakov
Comment 8
2026-09-03 10:25:47 PDT
***
Bug 276663
has been marked as a duplicate of this bug. ***
EWS
Comment 9
2026-09-17 09:37:08 PDT
Committed
321329@main
(9c43b4a10979): <
https://commits.webkit.org/321329@main
> Reviewed commits have been landed. Closing PR #65774 and removing active labels.
EWS
Comment 10
2026-09-30 00:39:29 PDT
Committed
321067.90@safari-7626-branch
(1befb92d2a8d): <
https://commits.webkit.org/321067.90@safari-7626-branch
> Reviewed commits have been landed. Closing PR #6943 and removing active labels.
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