vscode-css-navigation icon indicating copy to clipboard operation
vscode-css-navigation copied to clipboard

[Feature Request] Supports property selector

Open pucelle opened this issue 4 years ago • 2 comments

HTML codes:

<button primary>...

CSS codes:

 button[primary]{...}

Should goto CSS definition when cursor at primary in HTML codes and presses F12. And should have right auto completion label primary for HTML codes.

pucelle avatar Feb 21 '21 11:02 pucelle

this looks like an attribute selector to me, although there is no attribute "primary" for the HTML button element.

Having that for data and aria attributes would be very useful -- and whatever the HTML language server knows about (valid) HTML element attributes.

<button type="submit" 
        data-stuff="some fancy thing" 
        aria-labelledby="other-element-id">Send</button>
button[type] {}
button[type=submit] {} /* no quotes */
button[type="submit"] {} /* quotes */
button[data-stuff ~= "fancy"] {}
button[aria-labelledby ^= "other"] {}
button[aria-labelledby $= "id"] {}
button[aria-labelledby *= "element"] {}

WebMechanic avatar Mar 30 '22 19:03 WebMechanic

Well, thanks for your detailed commands, will work on it in my next vocation.

pucelle avatar Apr 10 '22 13:04 pucelle