Bug 233238 - Web Inspector: Nested style groupings are presented in reverse order in Styles sidebar panel
Summary: Web Inspector: Nested style groupings are presented in reverse order in Style...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Patrick Angle
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-11-16 20:53 PST by Patrick Angle
Modified: 2021-11-16 20:53 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Angle 2021-11-16 20:53:01 PST
Given a rule like
```
@media (min-width: 100px) {
    @supports(color: red) {
        body {
            background-color: red;
        }
    }
}
```

we currently show a list of grouping above the rule in the style sidebar in the reverse of that order. e.g.:
```
@support (color: red)
@media (min-width: 100px)
body {
    background-color: red;
}
```

But it would actually make more sense for us to mirror the declaration more closely and show...
```
@media (min-width: 100px)
@support (color: red)
body {
    background-color: red;
}
```

as it better represents the original CSS. This becomes particularly noticeable with bug 233208 which adds showing `@layer` groupings, where the order is important.
Comment 1 Radar WebKit Bug Importer 2021-11-16 20:53:17 PST
<rdar://problem/85488875>