WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
159634
Web Inspector: Simplify CSS selectors for Visual Styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=159634
Summary
Web Inspector: Simplify CSS selectors for Visual Styles sidebar
Nikita Vasilyev
Reported
2016-07-11 11:57:54 PDT
Many CSS selectors of Visual Styles sidebar are deeply nested and extremely verbose: .sidebar > .panel.details.css-style .visual > .details-section .details-section > .content .group > .row > .visual-style-property-container > .visual-style-property-title Often, it can be reduced to: .visual-style-property-title
Attachments
Patch
(9.68 KB, patch)
2016-07-14 15:29 PDT
,
Nikita Vasilyev
bburg
: review-
bburg
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2016-07-11 11:58:22 PDT
<
rdar://problem/27282143
>
Nikita Vasilyev
Comment 2
2016-07-14 15:29:07 PDT
Created
attachment 283693
[details]
Patch
Joseph Pecoraro
Comment 3
2016-07-14 16:26:42 PDT
Comment on
attachment 283693
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=283693&action=review
> Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.css:30 > -.sidebar > .panel.details.css-style .visual > .details-section .details-section > .header > .visual-style-section-clear { > +.visual-style-section-clear {
This affects the specificity of these selectors. This one for example is a huge change in specificity and changes common properties (like position, and width). How sure are we that this doesn't cause any breakage?
Timothy Hatcher
Comment 4
2016-07-14 16:32:46 PDT
Comment on
attachment 283693
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=283693&action=review
>> Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.css:30 >> +.visual-style-section-clear { > > This affects the specificity of these selectors. This one for example is a huge change in specificity and changes common properties (like position, and width). How sure are we that this doesn't cause any breakage?
I am also worried about this. Yes, this is still a unique selector. But it does now become possible to easily conflict with it. I agree dropping ".sidebar > .panel.details.css-style" for all rules is likely fine. Going further is not worth it, or needs done in a follow up with more testing.
Nikita Vasilyev
Comment 5
2016-07-14 16:38:56 PDT
(In reply to
comment #3
)
> Comment on
attachment 283693
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=283693&action=review
> > > Source/WebInspectorUI/UserInterface/Views/VisualStyleDetailsPanel.css:30 > > -.sidebar > .panel.details.css-style .visual > .details-section .details-section > .header > .visual-style-section-clear { > > +.visual-style-section-clear { > > This affects the specificity of these selectors. This one for example is a > huge change in specificity and changes common properties (like position, and > width). How sure are we that this doesn't cause any breakage?
I looked at all its usages: $ ack -Q '.visual-style-section-clear' --css UserInterface/Views/VisualStyleDetailsPanel.css 30:.visual-style-section-clear { 40:.details-section.collapsed > .header > .visual-style-section-clear, 41:.details-section .details-section:not(.modified) > .header > .visual-style-section-clear { I didn't see any other CSS rules applying to the same selector, e.g. .blah > div.
Nikita Vasilyev
Comment 6
2016-07-14 16:41:58 PDT
I agree that this patch looks dangerous. I'll split it into a several patches. Going forward, I'll try to review CSS changes so we don't get too many deeply nested selectors in the first place.
Devin Rousso
Comment 7
2018-10-25 01:30:48 PDT
The Visual styles sidebar was removed in
r236298
<
https://webkit.org/b/189807
>.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug