Closed Bug 1844499 Opened 2 years ago Closed 2 years ago

Nested rules are showing up in parent rule when stylesheet doesn't have as many closing brackets as opening brackets

Categories

(DevTools :: Inspector: Rules, defect, P2)

defect

Tracking

(firefox117 fixed)

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Steps to reproduce

  1. Navigate to data:text/html,<meta charset=utf8><style>body { h1 { color: tomato</style><h1>Hello
  2. Open the inspector and select the <body> element

Expected results

There's an empty body rule

Actual results

There's a child rule displayed inside the body rule:

body {
--h1: ; ⚠️
}

This should have been fixed with Bug 1838011 , but here it seems that the fact that the CSS doesn't have closing brackets is causing some trouble:

body {
  h1 {
    color: tomato

(the CSS applies fine, so we should handle it properly)

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a9cfccb7fc8d [devtools] Handle nested rule without closing paren. r=devtools-reviewers,bomsy.
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: