question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support slash `/` in HTML class names

See original GitHub issue

I 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:open
  • Created 3 years ago
  • Reactions:1
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
sergechecommented, Nov 7, 2020

JS implementation doesn’t have slash support in classes yet, but it can be easily ported (will do that very soon)

0reactions
vmitchell85commented, Nov 6, 2020

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found