0

How accurate is the use of special characters in css names, as in tailwind css framework?

I mean, I like it very much and I want to use it. I did some research. Either most of the sources did not say anything, or the source connections were broken.

Actually,

.hover\:red:hover
{
    color: red;
}
<p class="hover:red">Dummy (Hover me)</p>

Is it true that using this will work properly on all devices and third party browsers, except IE8 and below browsers?

Finally, is there a disadvantage for search engines? So SEO, usability, accessibility etc.

P.Works
  • 3
  • 2
  • `How accurate` is a vague way to ask a question. You best be might be trial and error across the spectrum of possibilities. – Michael Nelles Mar 23 '20 at 00:33
  • also look at this question as well https://stackoverflow.com/questions/122238/handling-a-colon-in-an-element-id-in-a-css-selector – Ismail Farooq Mar 23 '20 at 02:14

1 Answers1

1

In short YES

As you can see Tailwind Browser Support they cover all major browsers including IE 11.

Also they support accessibility as well with same approach.

So I don't think there is harm in this approach and any search engine will throw an error because its valid CSS selector. You can test it on w3c validator. Also there is no open SEO related issue on their Github Repo. So I believe you can feel free to use this approach.

BTW I just know about this selector lol.

Ismail Farooq
  • 6,309
  • 1
  • 27
  • 47