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.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. # selector-max-id
  2. Limit the number of ID selectors in a selector.
  3. <!-- prettier-ignore -->
  4. ```css
  5. #foo {}
  6. /** ↑
  7. * This type of selector */
  8. ```
  9. This rule resolves nested selectors before counting the number of ID selectors. Each selector in a [selector list](https://www.w3.org/TR/selectors4/#selector-list) is evaluated separately.
  10. 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.
  11. ## Options
  12. `int`: Maximum universal selectors allowed.
  13. For example, with `2`:
  14. The following patterns are considered violations:
  15. <!-- prettier-ignore -->
  16. ```css
  17. #foo #bar #baz {}
  18. ```
  19. <!-- prettier-ignore -->
  20. ```css
  21. #foo #bar {
  22. & #baz {}
  23. }
  24. ```
  25. <!-- prettier-ignore -->
  26. ```css
  27. #foo #bar {
  28. & > #bar {}
  29. }
  30. ```
  31. The following patterns are _not_ considered violations:
  32. <!-- prettier-ignore -->
  33. ```css
  34. #foo {}
  35. ```
  36. <!-- prettier-ignore -->
  37. ```css
  38. #foo #bar {}
  39. ```
  40. <!-- prettier-ignore -->
  41. ```css
  42. .foo #foo {}
  43. ```
  44. <!-- prettier-ignore -->
  45. ```css
  46. #foo.foo #bar {}
  47. ```
  48. <!-- prettier-ignore -->
  49. ```css
  50. /* each selector in a selector list is evaluated separately */
  51. #foo,
  52. #baz #quux {}
  53. ```
  54. <!-- prettier-ignore -->
  55. ```css
  56. /* `#bar` is inside `:not()`, so it is evaluated separately */
  57. #foo #bar:not(#baz) {}
  58. ```
  59. ### `ignoreContextFunctionalPseudoClasses: ["/regex/", /regex/, "non-regex"]`
  60. Ignore selectors inside of specified [functional pseudo-classes](https://drafts.csswg.org/selectors-4/#pseudo-classes) that provide [evaluation contexts](https://drafts.csswg.org/selectors-4/#specificity-rules).
  61. Given:
  62. ```js
  63. [":not", /^:(h|H)as$/];
  64. ```
  65. The following patterns are considered violations:
  66. <!-- prettier-ignore -->
  67. ```css
  68. a:matches(#foo) {}
  69. ```
  70. While the following patters are _not_ considered violations:
  71. <!-- prettier-ignore -->
  72. ```css
  73. a:not(#foo) {}
  74. ```
  75. <!-- prettier-ignore -->
  76. ```css
  77. a:has(#foo) {}
  78. ```