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 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # declaration-property-value-allowed-list
  2. Specify a list of allowed property and value pairs within declarations.
  3. <!-- prettier-ignore -->
  4. ```css
  5. a { text-transform: uppercase; }
  6. /** ↑ ↑
  7. * These properties and these values */
  8. ```
  9. ## Options
  10. `object`: `{ "unprefixed-property-name": ["array", "of", "values"], "unprefixed-property-name": ["/regex/", "non-regex", /regex/] }`
  11. If a property name is found in the object, only the listed property values are allowed. This rule complains about all non-matching values. (If the property name is not included in the object, anything goes.)
  12. If a property name is surrounded with `"/"` (e.g. `"/^animation/"`), it is interpreted as a regular expression. This allows, for example, easy targeting of shorthands: `/^animation/` will match `animation`, `animation-duration`, `animation-timing-function`, etc.
  13. The same goes for values. Keep in mind that a regular expression value is matched against the entire value of the declaration, not specific parts of it. For example, a value like `"10px solid rgba( 255 , 0 , 0 , 0.5 )"` will _not_ match `"/^solid/"` (notice beginning of the line boundary) but _will_ match `"/\\s+solid\\s+/"` or `"/\\bsolid\\b/"`.
  14. Be careful with regex matching not to accidentally consider quoted string values and `url()` arguments. For example, `"/red/"` will match value such as `"1px dotted red"` as well as `"\"red\""` and `"white url(/mysite.com/red.png)"`.
  15. Given:
  16. ```
  17. {
  18. "transform": ["/scale/"],
  19. "whitespace": ["nowrap"],
  20. "/color/": ["/^green/"]
  21. }
  22. ```
  23. The following patterns are considered violations:
  24. <!-- prettier-ignore -->
  25. ```css
  26. a { whitespace: pre; }
  27. ```
  28. <!-- prettier-ignore -->
  29. ```css
  30. a { transform: translate(1, 1); }
  31. ```
  32. <!-- prettier-ignore -->
  33. ```css
  34. a { -webkit-transform: translate(1, 1); }
  35. ```
  36. <!-- prettier-ignore -->
  37. ```css
  38. a { color: pink; }
  39. ```
  40. <!-- prettier-ignore -->
  41. ```css
  42. a { background-color: pink; }
  43. ```
  44. The following patterns are _not_ considered violations:
  45. <!-- prettier-ignore -->
  46. ```css
  47. a { whitespace: nowrap; }
  48. ```
  49. <!-- prettier-ignore -->
  50. ```css
  51. a { transform: scale(1, 1); }
  52. ```
  53. <!-- prettier-ignore -->
  54. ```css
  55. a { -webkit-transform: scale(1, 1); }
  56. ```
  57. <!-- prettier-ignore -->
  58. ```css
  59. a { color: green; }
  60. ```
  61. <!-- prettier-ignore -->
  62. ```css
  63. a { background-color: green; }
  64. ```