Cmd+/ should comment out CSS property when focused on a property name or property value. Cmd+/ should uncomment CSS property when it is commented out [1]. Cmd+/ should comment out all CSS properties of the rule when focused on a selector. Cmd+/ should uncomment CSS properties if all of them are commented out. [1]: currently there is no way to focus on the commented out property, i.e. Tab/Shift-Tab skips disabled properties. We probably want to make <div class=property> focusable. I see this as the trickiest part of this task.
<rdar://problem/36203388>
When a property is selected, pressing Space should also toggle it.
Created attachment 353582 [details] Patch
Created attachment 353583 [details] [Animated GIF] With patch applied
Comment on attachment 353582 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=353582&action=review r=me > Source/WebInspectorUI/ChangeLog:25 > + Make `update` method public. No other chanches were made. Nit: changes
Comment on attachment 353582 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=353582&action=review > Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:240 > + get selectionRange() Nice! > Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:535 > + } else if (event.code === "Space" || (event.key === "/" && event.metaKey)) { Do we wan't to prevent other "special" keys as well (e.g. not while holding shift).
Created attachment 353622 [details] Patch
Comment on attachment 353622 [details] Patch Clearing flags on attachment: 353622 Committed r237692: <https://trac.webkit.org/changeset/237692>
All reviewed patches have been landed. Closing bug.