Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # selector-max-class
  2. Limit the number of classes in a selector.
  3. <!-- prettier-ignore -->
  4. ```css
  5. div .foo.bar[data-val] > a.baz {}
  6. /* ↑ ↑ ↑
  7. ↑ ↑ ↑
  8. 1 2 3 -- this selector contains three classes */
  9. ```
  10. This rule resolves nested selectors before counting the number of classes in a selector. Each selector in a [selector list](https://www.w3.org/TR/selectors4/#selector-list) is evaluated separately.
  11. The `:not()` pseudo-class is also evaluated separately. The rule processes the argument as if it were an independent selector, and the result does not count toward the total for the entire selector.
  12. ## Options
  13. `int`: Maximum classes allowed.
  14. For example, with `2`:
  15. The following patterns are considered violations:
  16. <!-- prettier-ignore -->
  17. ```css
  18. .foo.bar.baz {}
  19. ```
  20. <!-- prettier-ignore -->
  21. ```css
  22. .foo .bar {
  23. & > .baz {}
  24. }
  25. ```
  26. The following patterns are _not_ considered violations:
  27. <!-- prettier-ignore -->
  28. ```css
  29. div {}
  30. ```
  31. <!-- prettier-ignore -->
  32. ```css
  33. .foo .bar {}
  34. ```
  35. <!-- prettier-ignore -->
  36. ```css
  37. .foo.bar,
  38. .lorem.ipsum {} /* each selector in a selector list is evaluated separately */
  39. ```
  40. <!-- prettier-ignore -->
  41. ```css
  42. .foo .bar :not(.lorem.ipsum) {} /* `.lorem.ipsum` is inside `:not()`, so it is evaluated separately */
  43. ```