Support slash `/` in HTML class names
See original GitHub issueI inherited this quirky HTML/CSS framework that uses fractions to represent columns.
Here’s the string that I tried to expand in Sublime Text using Emmet:
.block-list__item.1/2--tablet-and-up.1/3--desk
Expected:
<div class="block-list__item 1/2--tablet-and-up 1/3--desk"></div>
Actual:
<div class="block-list__item block-list__item--grow 1">
<2--tablet-and-up class="1">
<3--desk></3--desk>
You can see that it starts creating new div from the slash character. I guess this is the intended functionality?
Maybe there’s some way to figure out if it should be a new expression or if it’s a class name like fraction? 🤔
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Forward slash in class name [duplicate] - html - Stack Overflow
Forward slash in class name [duplicate] · This will answer it stackoverflow.com/questions/448981/… · this symbol is not valid. · Using non- ...
Read more >CSS Class Name With Forward Slash or UniCode Character
Using a forward slash in class name is perfectly valid in CSS. You can use most of unicode characters in both the class...
Read more >HTML class Attribute - W3Schools
The HTML class attribute specifies one or more class names for an element · Classes are used by CSS and JavaScript to select...
Read more >Which characters are valid in CSS class names/selectors?
A valid name should start with an underscore (_), a hyphen (-) or a letter (a-z)/(A-Z) which is followed by any numbers, hyphens,...
Read more >Unicode Characters for Class Names | CSS-Tricks
The idea is that you can use unicode characters (read: fancy symbols) for class names in your HTML, and even use write CSS...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
JS implementation doesn’t have slash support in classes yet, but it can be easily ported (will do that very soon)
Thanks for the additional info. I’l see if I can create a request on their repo. does the official Emmet core have the slash between numbers support or would that need to be requested from the vscode team as well?
Thanks again for an amazing product that makes my life as a developer much much better!