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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. # color-function-notation
  2. Specify modern or legacy notation for applicable color-functions.
  3. <!-- prettier-ignore -->
  4. ```css
  5. a { color: rgb(0 0 0 / 0.2) }
  6. /** ↑
  7. * This notation */
  8. ```
  9. Modern color-functions use a comma-free syntax because functions in CSS are used to group/name a syntax chunk. They should work by the same rules that CSS grammar does in general: values are optional and re-orderable when possible, space-separated, and commas are used to separate repetitions only.
  10. For legacy reasons, `rgb()` and `hsl()` also supports an alternate syntax that separates all of its arguments with commas. Also for legacy reasons, the `rgba()` and `hsla()` functions exist using the same comma-based syntax.
  11. The [`fix` option](../../../docs/user-guide/usage/options.md#fix) can automatically fix some of the problems reported by this rule when the primary option is `"modern"`.
  12. ## Options
  13. `string`: `"modern"|"legacy"`
  14. ### `"modern"`
  15. Applicable color-functions _must always_ use modern notation.
  16. The following patterns are considered violations:
  17. <!-- prettier-ignore -->
  18. ```css
  19. a { color: rgb(0, 0, 0) }
  20. ```
  21. <!-- prettier-ignore -->
  22. ```css
  23. a { color: rgba(12, 122, 231, 0.2) }
  24. ```
  25. <!-- prettier-ignore -->
  26. ```css
  27. a { color: hsla(270, 60%, 50%, 15%) }
  28. ```
  29. <!-- prettier-ignore -->
  30. ```css
  31. a { color: hsl(.75turn, 60%, 70%) }
  32. ```
  33. The following patterns are _not_ considered violations:
  34. <!-- prettier-ignore -->
  35. ```css
  36. a { color: rgb(0 0 0) }
  37. ```
  38. <!-- prettier-ignore -->
  39. ```css
  40. a { color: rgb(12 122 231 / 0.2) }
  41. ```
  42. <!-- prettier-ignore -->
  43. ```css
  44. a { color: hsl(270 60% 50% / 15%) }
  45. ```
  46. <!-- prettier-ignore -->
  47. ```css
  48. a { color: hsl(.75turn 60% 70%) }
  49. ```
  50. ### `"legacy"`
  51. Applicable color-functions _must always_ use the legacy notation.
  52. The following patterns are considered violations:
  53. <!-- prettier-ignore -->
  54. ```css
  55. a { color: rgb(0 0 0) }
  56. ```
  57. <!-- prettier-ignore -->
  58. ```css
  59. a { color: rgb(12 122 231 / 0.2) }
  60. ```
  61. <!-- prettier-ignore -->
  62. ```css
  63. a { color: hsl(270 60% 50% / 15%) }
  64. ```
  65. <!-- prettier-ignore -->
  66. ```css
  67. a { color: hsl(.75turn 60% 70%) }
  68. ```
  69. The following patterns are _not_ considered violations:
  70. <!-- prettier-ignore -->
  71. ```css
  72. a { color: rgb(0, 0, 0) }
  73. ```
  74. <!-- prettier-ignore -->
  75. ```css
  76. a { color: rgba(12, 122, 231, 0.2) }
  77. ```
  78. <!-- prettier-ignore -->
  79. ```css
  80. a { color: hsla(270, 60%, 50%, 15%) }
  81. ```
  82. <!-- prettier-ignore -->
  83. ```css
  84. a { color: hsl(.75turn, 60%, 70%) }
  85. ```