RESOLVED FIXED 215680
Web Inspector: Elements: Styles: grey out properties that aren't used/apply
https://bugs.webkit.org/show_bug.cgi?id=215680
Summary Web Inspector: Elements: Styles: grey out properties that aren't used/apply
Devin Rousso
Reported 2020-08-19 20:03:22 PDT
IMO, the strikethrough isn't a visually obvious enough indicator that "this property is NOT being used/applied"
Attachments
Patch (4.21 KB, patch)
2020-08-19 20:05 PDT, Devin Rousso
hi: commit-queue-
[Image] Screenshot of issue (38.75 KB, image/png)
2020-08-20 14:18 PDT, Devin Rousso
no flags
[Image] After Patch is applied (38.01 KB, image/png)
2020-08-20 14:18 PDT, Devin Rousso
no flags
Patch (10.90 KB, patch)
2020-08-23 18:17 PDT, Devin Rousso
no flags
Devin Rousso
Comment 1 2020-08-19 20:05:13 PDT
Nikita Vasilyev
Comment 2 2020-08-19 20:34:04 PDT
Screenshot?
Nikita Vasilyev
Comment 3 2020-08-19 20:47:36 PDT
Comment on attachment 406902 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=406902&action=review > Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:114 > +body:not(.meta-key-pressed) .spreadsheet-style-declaration-editor > .property:matches(.invalid-name, .invalid-value, .other-vendor, .overridden):not(.disabled) > .content > :matches(.name, .value-container):not(.editing), > +body:not(.meta-key-pressed) .spreadsheet-style-declaration-editor > .property:matches(.invalid-name, .invalid-value, .other-vendor, .overridden):not(.disabled) > .content > .value-container > .value:not(.editing), > +body.meta-key-pressed .spreadsheet-style-declaration-editor > .property:matches(.invalid-name, .invalid-value, .other-vendor, .overridden):not(.disabled) > .content > :matches(.name, .value-container):not(:hover, .editing), > +body.meta-key-pressed .spreadsheet-style-declaration-editor > .property:matches(.invalid-name, .invalid-value, .other-vendor, .overridden):not(.disabled) > .content > .value-container > .value:not(:hover, .editing) { That's one long selector. I see it isn't particularly new — two rules below use very similar selector. The `body:not(.meta-key-pressed)` and `body.meta-key-pressed` gives me a pause in particular. I wonder how we can simplify it. > Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:115 > + color: hsla(0, 0%, var(--foreground-lightness), 0.6); Any particular reason not to use `var(--text-color-secondary)`?
Devin Rousso
Comment 4 2020-08-20 12:20:32 PDT
Comment on attachment 406902 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=406902&action=review >> Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:114 >> +body.meta-key-pressed .spreadsheet-style-declaration-editor > .property:matches(.invalid-name, .invalid-value, .other-vendor, .overridden):not(.disabled) > .content > .value-container > .value:not(:hover, .editing) { > > That's one long selector. I see it isn't particularly new — two rules below use very similar selector. > The `body:not(.meta-key-pressed)` and `body.meta-key-pressed` gives me a pause in particular. I wonder how we can simplify it. `body:not(.meta-key-pressed)` includes `:hover` `body.meta-key-pressed` excludes `:hover` this is also "necessary" because of specificity conflicts with other rules (which possibly could be resolved using additional `:not`, but that's likely a larger change) >> Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:115 >> + color: hsla(0, 0%, var(--foreground-lightness), 0.6); > > Any particular reason not to use `var(--text-color-secondary)`? I wanted to match the color of the strikethrough.
Nikita Vasilyev
Comment 5 2020-08-20 12:36:03 PDT
Comment on attachment 406902 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=406902&action=review >>> Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:114 >>> +body.meta-key-pressed .spreadsheet-style-declaration-editor > .property:matches(.invalid-name, .invalid-value, .other-vendor, .overridden):not(.disabled) > .content > .value-container > .value:not(:hover, .editing) { >> >> That's one long selector. I see it isn't particularly new — two rules below use very similar selector. >> The `body:not(.meta-key-pressed)` and `body.meta-key-pressed` gives me a pause in particular. I wonder how we can simplify it. > > `body:not(.meta-key-pressed)` includes `:hover` > `body.meta-key-pressed` excludes `:hover` > > this is also "necessary" because of specificity conflicts with other rules (which possibly could be resolved using additional `:not`, but that's likely a larger change) Okay, I think it's good for now. >>> Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:115 >>> + color: hsla(0, 0%, var(--foreground-lightness), 0.6); >> >> Any particular reason not to use `var(--text-color-secondary)`? > > I wanted to match the color of the strikethrough. I think that strikethrough should also be `var(--text-color-secondary)`.
Devin Rousso
Comment 6 2020-08-20 14:18:28 PDT
Created attachment 406966 [details] [Image] Screenshot of issue
Devin Rousso
Comment 7 2020-08-20 14:18:40 PDT
Created attachment 406967 [details] [Image] After Patch is applied
Devin Rousso
Comment 8 2020-08-20 14:19:31 PDT
Comment on attachment 406967 [details] [Image] After Patch is applied Looking at this more closely, it appears that the `:` and `;` are also re-colored, which is probably not necessary. I'll tweak the selector to not include those.
Devin Rousso
Comment 9 2020-08-23 18:17:25 PDT
Blaze Burg
Comment 10 2020-08-24 10:02:22 PDT
Comment on attachment 407085 [details] Patch r=me, these huge selectors make me dizzy though.
EWS
Comment 11 2020-08-24 10:11:16 PDT
Committed r266066: <https://trac.webkit.org/changeset/266066> All reviewed patches have been landed. Closing bug and clearing flags on attachment 407085 [details].
Radar WebKit Bug Importer
Comment 12 2020-08-24 10:11:30 PDT
Note You need to log in before you can comment on or make changes to this bug.