0

One of my div's names is "N/A (nationwide)", and I have an scss file for css properties. How would I apply css to this div?

neither

 .N/A{

}

.(nationwide){

}

seem to work.

Cœur
  • 37,241
  • 25
  • 195
  • 267
csiscs
  • 69
  • 2
  • 10

2 Answers2

0

You need to escape the / character with a backslash, like this:

.N\/A{
    ...
}
posit labs
  • 8,951
  • 4
  • 36
  • 66
0

There are other questions about the allowed characters in class names, and you can also check the Grammar on W3 that / isn't an allowed character in class names.

I'm not aware of any Sass rule that allows it.

Dinei
  • 4,494
  • 4
  • 36
  • 60