Bug 215682 - Web Inspector: Elements: Styles: don't show non-inherited properties
Summary: Web Inspector: Elements: Styles: don't show non-inherited properties
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-08-19 20:03 PDT by Devin Rousso
Modified: 2020-08-24 10:21 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.51 KB, patch)
2020-08-19 20:05 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2020-08-19 20:03:46 PDT
IMO there's very little reason to show non-inherited properties in rules with other inherited properties, as that just adds confusion as to what's actually being used/applied
Comment 1 Devin Rousso 2020-08-19 20:05:39 PDT
Created attachment 406904 [details]
Patch
Comment 2 Nikita Vasilyev 2020-08-19 21:11:03 PDT
I'm expecting blowback about this.

When we show a CSS rule, we always shows all CSS properties, unaltered. This is how it has been for over a decade. The proposed patch would break this paradigm.
Comment 3 Devin Rousso 2020-08-20 12:20:37 PDT
(In reply to Nikita Vasilyev from comment #2)
> When we show a CSS rule, we always shows all CSS properties, unaltered. This is how it has been for over a decade. The proposed patch would break this paradigm.

I appreciate that, but I personally don't think I'd really miss seeing the other properties.  Showing only the properties that are inherited focuses on what actually matters and removes potential points of confusion (especially for beginners who may not know what properties inherit vs not).  The section header just above each rule (those that are applicable) says "Inherited from ...", so having properties that are not in fact "Inherited from ..." is debatably a lie.

btw I'm not "set in stone" on this or anything like that.  I definitely think living on this is gonna tell the true story, but my gut is leaning towards this change.  I put this up for people to give it a shot and see how it feels.  We could try it as an experimental feature (or some sort of filter) to start.
Comment 4 BJ Burg 2020-08-24 09:57:07 PDT
(In reply to Nikita Vasilyev from comment #2)
> I'm expecting blowback about this.
> 
> When we show a CSS rule, we always shows all CSS properties, unaltered. This
> is how it has been for over a decade. The proposed patch would break this
> paradigm.

I think this was more a result of the old styles UI using original source text, and thus it was a messy proposition to omit lines that aren't helpful. Since we are no longer constrained to show the original source text as-is, I think this is a change in the right direction.

The one scenario where I would want to see matched-but-overridden declarations is if the wrong declaration is taking precedence and I need to figure out how to fix the specificity. The Computed Styles panel shows conflicts on a per-property basis and seems strictly better at this task.
Comment 5 BJ Burg 2020-08-24 09:57:44 PDT
Comment on attachment 406904 [details]
Patch

r=me

Sad we can't test this.
Comment 6 Radar WebKit Bug Importer 2020-08-24 10:12:32 PDT
<rdar://problem/67685743>
Comment 7 EWS 2020-08-24 10:21:11 PDT
Committed r266069: <https://trac.webkit.org/changeset/266069>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 406904 [details].