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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # selector-class-pattern
  2. Specify a pattern for class selectors.
  3. <!-- prettier-ignore -->
  4. ```css
  5. .foo, #bar.baz span, #hoo[disabled] { color: pink; }
  6. /** ↑ ↑
  7. * These class selectors */
  8. ```
  9. This rule ignores non-outputting Less mixin definitions and called Less mixins.
  10. Escaped selectors (e.g. `.u-size-11\/12\@sm`) are parsed as escaped twice (e.g. `.u-size-11\\/12\\@sm`). Your RegExp should account for that.
  11. ## Options
  12. `regex|string`
  13. A string will be translated into a RegExp like so `new RegExp(yourString)` — so be sure to escape properly.
  14. The selector value _after `.`_ will be checked. No need to include `.` in your pattern.
  15. Given the string:
  16. ```js
  17. "foo-[a-z]+";
  18. ```
  19. The following patterns are considered violations:
  20. <!-- prettier-ignore -->
  21. ```css
  22. .foop {}
  23. ```
  24. <!-- prettier-ignore -->
  25. ```css
  26. .foo-BAR {}
  27. ```
  28. <!-- prettier-ignore -->
  29. ```css
  30. div > #zing + .foo-BAR {}
  31. ```
  32. The following patterns are _not_ considered violations:
  33. <!-- prettier-ignore -->
  34. ```css
  35. .foo-bar {}
  36. ```
  37. <!-- prettier-ignore -->
  38. ```css
  39. div > #zing + .foo-bar {}
  40. ```
  41. <!-- prettier-ignore -->
  42. ```css
  43. #foop {}
  44. ```
  45. <!-- prettier-ignore -->
  46. ```css
  47. [foo='bar'] {}
  48. ```
  49. ## Optional secondary options
  50. ### `resolveNestedSelectors: true | false` (default: `false`)
  51. This option will resolve nested selectors with `&` interpolation.
  52. For example, with `true`.
  53. Given the string:
  54. ```
  55. "^[A-Z]+$"
  56. ```
  57. The following patterns are considered violations:
  58. <!-- prettier-ignore -->
  59. ```css
  60. .A {
  61. &__B {} /* resolved to ".A__B" */
  62. }
  63. ```
  64. The following patterns are _not_ considered violations:
  65. <!-- prettier-ignore -->
  66. ```css
  67. .A {
  68. &B {} /* resolved to ".AB" */
  69. }
  70. ```