Summary: | Web Inspector: Implement autocompletion for CSS variables | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Nikita Vasilyev <nvasilyev> | ||||||||||
Component: | Web Inspector | Assignee: | Devin Rousso <hi> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | commit-queue, hi, inspector-bugzilla-changes, joepeck, webkit-bug-importer | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | All | ||||||||||||
OS: | All | ||||||||||||
Attachments: |
|
Created attachment 306936 [details]
Patch
Created attachment 306937 [details]
[Image] After Patch is applied
Comment on attachment 306936 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=306936&action=review r=me > Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js:392 > + let variables = properties.filter((property) => /--[\w-]+/.test(property.name) && property.name.startsWith(prefix)); We already have `property.variable` which would let us drop this RegExp match (which looks unnecessarily complex): let variables = properties.filter((property) => property.variable && property.name.startsWith(prefix)); Created attachment 307096 [details]
Patch
Comment on attachment 307096 [details] Patch Clearing flags on attachment: 307096 Committed r215358: <http://trac.webkit.org/changeset/215358> All reviewed patches have been landed. Closing bug. |
Created attachment 271738 [details] [Image] Mockup It would be nice to show an autocomplete pop-over for CSS variables. Neither Chrome DevTools nor Firefox DevTools has it yet.