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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. # declaration-property-value-whitelist
  2. **_Deprecated: Instead use the [`declaration-property-value-allowed-list`](../declaration-property-value-allowed-list/README.md) rule._**
  3. Specify a list of allowed property and value pairs within declarations.
  4. <!-- prettier-ignore -->
  5. ```css
  6. a { text-transform: uppercase; }
  7. /** ↑ ↑
  8. * These properties and these values */
  9. ```
  10. ## Options
  11. `object`: `{ "unprefixed-property-name": ["array", "of", "values"], "unprefixed-property-name": ["/regex/", "non-regex"] }`
  12. 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.)
  13. 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.
  14. 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/"`.
  15. 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)"`.
  16. Given:
  17. ```
  18. {
  19. "transform": ["/scale/"],
  20. "whitespace": ["nowrap"],
  21. "/color/": ["/^green/"]
  22. }
  23. ```
  24. The following patterns are considered violations:
  25. <!-- prettier-ignore -->
  26. ```css
  27. a { whitespace: pre; }
  28. ```
  29. <!-- prettier-ignore -->
  30. ```css
  31. a { transform: translate(1, 1); }
  32. ```
  33. <!-- prettier-ignore -->
  34. ```css
  35. a { -webkit-transform: translate(1, 1); }
  36. ```
  37. <!-- prettier-ignore -->
  38. ```css
  39. a { color: pink; }
  40. ```
  41. <!-- prettier-ignore -->
  42. ```css
  43. a { background-color: pink; }
  44. ```
  45. The following patterns are _not_ considered violations:
  46. <!-- prettier-ignore -->
  47. ```css
  48. a { color: pink; }
  49. ```
  50. <!-- prettier-ignore -->
  51. ```css
  52. a { whitespace: nowrap; }
  53. ```
  54. <!-- prettier-ignore -->
  55. ```css
  56. a { transform: scale(1, 1); }
  57. ```
  58. <!-- prettier-ignore -->
  59. ```css
  60. a { -webkit-transform: scale(1, 1); }
  61. ```
  62. <!-- prettier-ignore -->
  63. ```css
  64. a { color: green; }
  65. ```
  66. <!-- prettier-ignore -->
  67. ```css
  68. a { background-color: green; }
  69. ```
  70. <!-- prettier-ignore -->
  71. ```css
  72. a { background: pink; }
  73. ```