Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS class name autocompletion in HTML/Markup #2360

Open
theetrain opened this issue May 1, 2024 · 1 comment
Open

CSS class name autocompletion in HTML/Markup #2360

theetrain opened this issue May 1, 2024 · 1 comment
Labels
feature request New feature or request

Comments

@theetrain
Copy link

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

@jasonlyu123
Copy link
Member

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 jasonlyu123 added the feature request New feature or request label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants