Auto complete CSS custom property names

RESOLVED DUPLICATE of bug 1422635

Status

DevTools
CSS Rules Inspector
P2
normal
RESOLVED DUPLICATE of bug 1422635
2 years ago
10 days ago

People

(Reporter: pbro, Unassigned)

Tracking

(Blocks: 2 bugs)

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [btpp-fix-later])

(Reporter)

Description

2 years ago
Similarly to how text editors often offer variable name auto-completion, it would be useful if the rule-view auto-completed CSS variable names.

Say you start typing "var(--" as a value of a property in the rule-view,
it'd be nice if the rule-view then showed the usual auto-completion drop-down list (which we already have for property names and values in certain cases), populated with matching variable names if they are in scope.

Getting the list of variable names to populate the drop-down shouldn't be too hard since we only need to start looking at the current rule and then walk up the parent rules. This is exactly what the rule-view already does when it displays the list of rules for a given element.

The hard(er) part will be making the suggestion drop-down appear at the right time and place.
(Reporter)

Comment 1

2 years ago
VS Code added this recently: https://twitter.com/dstorey/status/740042214366027781

Comment 2

a year ago
Chrome added this recently: https://twitter.com/malyw/status/826486604609028098

Updated

11 months ago
Blocks: 1337918
(Reporter)

Updated

7 months ago
Duplicate of this bug: 1410189
(Reporter)

Updated

5 months ago
Status: NEW → RESOLVED
Last Resolved: 5 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1422635

Updated

10 days ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.