Skip to content

Support prefixed / non-standard class names #113

@onetrev

Description

@onetrev

Currently the regex used for this extension -> const classNameRegex: RegExp = /[.]([\w-]+)/g; will only accept standard class name characters. However, you can (as of CSS 2.1) escape non-standard characters in your CSS. So hopefully support for this can be added. This is also applicable for anyone using TailwindCSS, but there are lots of other use cases for classes such as:

.md\:absolute
.sm\:w-1\/2

Of course when you are autocompleting they need to show up sanitized, with the escape character removed so like so:

.md:absolute
.sm:w-1/2

I've noticed this is supported in this extention I believe using the two functions at the bottom of this file.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions