HTML-CSS-Class-Completion icon indicating copy to clipboard operation
HTML-CSS-Class-Completion copied to clipboard

Support for special characters in css class names

Open m2de opened this issue 8 years ago • 3 comments

The plugin currently doesn't work if css class names use special characters (e.g. .foo\:bar or .foo\/bar). There are a couple of different places where this becomes a problem.

  1. Class names with special chars don't appear in the auto-completion dropdown
  2. When a class with a special char is used inside a class="foo:bar", triggering the auto-completion after will no longer display the correct classes in the dropdown.

While unusual, the special characters are supported/valid in CSS so it would be great to also add support here.

m2de avatar Dec 06 '17 13:12 m2de

I also have this issue, dashes work okay .block--mod, but underscores don't .block__elem. This is particularly a problem when you use BEM naming convention.

JoshWeb avatar Jan 30 '18 16:01 JoshWeb

Whoops, I guess the issue I created is a duplicate of this one. I did include a few details to hopefully help the author or someone else develop a fix for this. I linked to another extension that does support special chars, but isn't overall as good as this extension.

onetrev avatar Feb 13 '18 03:02 onetrev

May I add that it also stop working when using parentheses in class names, for example: text-(1rem)

macCesar avatar Oct 14 '22 17:10 macCesar