language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

CSS class name autocompletion in HTML/Markup

Open theetrain opened this issue 1 year ago • 1 comments

Description

When entering a class name in HTML, it would be nice to see autocompletion for global selectors defined in an outside .css file.

Proposed solution

Example:

<script>
  import '$lib/main.css'
</script>

<button class="">text</button>

When entering text in the class attribute, it'll pull available classes from a project-defined .css file; whether or not it's being imported explicitly in <script>.

Alternatives

No response

Additional Information, eg. Screenshots

Possibly relates to #84 and #521

theetrain avatar May 01 '24 20:05 theetrain

https://marketplace.visualstudio.com/items?itemName=Zignd.html-css-class-completion This extension does support svelte and it does work well at first glance. It uses regex for class attributes, so it might sometimes have some false completion, though.

jasonlyu123 avatar May 02 '24 04:05 jasonlyu123