-3

I'm getting an error as "Unexpected token '.0' ". Suggest an alternate solution to solve this. As I'm getting the class as "parent 0-item".

.parent 0-item
  {
    pointer-events: none !important;
    cursor: default;
  }
sharmila
  • 175
  • 2
  • 19
  • I think it is supposed to be `.parent.0-item`. Since from what I understood, those classes are from the same element – Carl Binalla Jan 29 '19 at 05:52
  • I am assuming that 0-item is class. Add .(dot) to )-item.. `.0-item` – Xenio Gracias Jan 29 '19 at 05:54
  • Possible duplicate of [Which characters are valid in CSS class names/selectors?](https://stackoverflow.com/questions/448981/which-characters-are-valid-in-css-class-names-selectors) – Erik Philips Jan 29 '19 at 05:58
  • In CSS, identifiers (including element names, classes, and IDs in selectors) can contain only the characters [a-z0-9] and ISO 10646 characters U+00A1 and higher, plus the hyphen (-) and the underscore (_); **they cannot start with a digit**, or a hyphen followed by a digit. – Erik Philips Jan 29 '19 at 05:59

1 Answers1

1

As per my understanding, you just receive the class name and have no control over the rendered HTML. If that's the case, then you can use an attribute selector.

[class='parent 0-item'] {
    pointer-events: none !important;
    cursor: default;
    color: red;
}
<div class="parent 0-item">
    Hello World!
</div>
Chris Tapay
  • 1,004
  • 10
  • 21