Bug 180793 - Web Inspector: Styles Redesign: properties should never be semitransparent or crossed out while editing
Summary: Web Inspector: Styles Redesign: properties should never be semitransparent or...
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: Nikita Vasilyev
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-12-13 18:59 PST by Nikita Vasilyev
Modified: 2018-01-13 20:06 PST (History)
4 users (show)

See Also:


Attachments
[Image] Bug (77.55 KB, image/png)
2017-12-13 18:59 PST, Nikita Vasilyev
no flags Details
[Image] Edited properties should not be crossed out (78.16 KB, image/png)
2017-12-13 19:10 PST, Nikita Vasilyev
no flags Details
Patch (5.48 KB, patch)
2017-12-14 22:20 PST, Devin Rousso
nvasilyev: review-
Details | Formatted Diff | Diff
[Image] inline vs inline-block (83.07 KB, image/png)
2017-12-15 17:44 PST, Nikita Vasilyev
no flags Details
Patch (4.87 KB, patch)
2018-01-13 18:15 PST, Nikita Vasilyev
hi: review+
Details | Formatted Diff | Diff
[Image] With patch applied (29.73 KB, image/png)
2018-01-13 18:18 PST, Nikita Vasilyev
no flags Details
Patch (4.74 KB, patch)
2018-01-13 19:25 PST, Nikita Vasilyev
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2017-12-13 18:59:03 PST
Created attachment 329309 [details]
[Image] Bug

Non-inherited properties of inherited rules are semitransparent (opacity: 0.5).
When editing, the text is gray and text selection color is too dim. Newly added properties
of inherited rules are semitransparent, too.

All properties should be opaque when editing.
Comment 1 Radar WebKit Bug Importer 2017-12-13 18:59:25 PST
<rdar://problem/36038813>
Comment 2 Nikita Vasilyev 2017-12-13 19:10:13 PST
Created attachment 329312 [details]
[Image] Edited properties should not be crossed out
Comment 3 Devin Rousso 2017-12-14 22:20:46 PST
Created attachment 329464 [details]
Patch
Comment 4 Nikita Vasilyev 2017-12-15 17:44:43 PST
Created attachment 329547 [details]
[Image] inline vs inline-block

View in context: https://bugs.webkit.org/attachment.cgi?id=329464&action=review

> Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:-54
> -.spreadsheet-style-declaration-editor .value.editing {
> -    display: inline-block;
> -    margin-right: 3px;
> -}

Initially, I made values inline, but after one of the design meetings two months ago we decided to change it to inline-block.

Text selection looks better with inline-block. As a downside, value element may move when you start editing it.

I'd prefer to keep it inline-block.

We should hide ";" while editing values.
Comment 5 Nikita Vasilyev 2017-12-15 17:48:23 PST
Comment on attachment 329464 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=329464&action=review

Looks good overall.

> Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:113
> -.spreadsheet-style-declaration-editor .property.not-inherited {
> +.spreadsheet-style-declaration-editor .property.not-inherited .content > * {

I generally try to avoid using * in CSS, but I think it's fine here.
Comment 6 Nikita Vasilyev 2017-12-15 17:53:20 PST
Comment on attachment 329464 [details]
Patch

r- because I don't want `display: inline-block` to be removed.
Comment 7 Nikita Vasilyev 2018-01-11 11:46:41 PST
Devin, do you mind if I finish this one? There was no activity here for a month. I'll post an updated patch tonight unless you want to finish it yourself.
Comment 8 Devin Rousso 2018-01-11 14:12:20 PST
(In reply to Nikita Vasilyev from comment #7)
> Devin, do you mind if I finish this one? There was no activity here for a
> month. I'll post an updated patch tonight unless you want to finish it
> yourself.
Go for it.  I'm in the midst of Syllabus week right now, so things are a bit hectic.  Sorry for the delay 😅
Comment 9 Nikita Vasilyev 2018-01-13 18:15:27 PST
Created attachment 331296 [details]
Patch
Comment 10 Nikita Vasilyev 2018-01-13 18:18:00 PST
Created attachment 331298 [details]
[Image] With patch applied
Comment 11 Devin Rousso 2018-01-13 18:41:10 PST
Comment on attachment 331296 [details]
Patch

r=me

One thing that I noticed when I was working on this was that when you edit the value, it shifts the semicolon around.  This is because of the `margin-right: 3px;` in the `.spreadsheet-style-declaration-editor .value.editing` rule.  If you remove that, the semicolon doesn't shift anymore, but it now appears "above" the shadow.  I think the solution here is to move the editing element "above" the rest of the content while it is being modified.

    .spreadsheet-style-declaration-editor .value.editing {
        display: inline-block;
        position: relative;
        z-index: 1;
    }
Comment 12 Nikita Vasilyev 2018-01-13 19:25:57 PST
Created attachment 331299 [details]
Patch

(In reply to Devin Rousso from comment #11)
> One thing that I noticed when I was working on this was that when you edit
> the value, it shifts the semicolon around.  This is because of the
> `margin-right: 3px;` in the `.spreadsheet-style-declaration-editor
> .value.editing` rule.  If you remove that, the semicolon doesn't shift
> anymore, but it now appears "above" the shadow.  I think the solution here
> is to move the editing element "above" the rest of the content while it is
> being modified.
> 
>     .spreadsheet-style-declaration-editor .value.editing {
>         display: inline-block;
>         position: relative;
>         z-index: 1;
>     }

This looks good, thanks!
Comment 13 WebKit Commit Bot 2018-01-13 20:06:20 PST
Comment on attachment 331299 [details]
Patch

Clearing flags on attachment: 331299

Committed r226939: <https://trac.webkit.org/changeset/226939>
Comment 14 WebKit Commit Bot 2018-01-13 20:06:21 PST
All reviewed patches have been landed.  Closing bug.