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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. # declaration-block-no-redundant-longhand-properties
  2. Disallow longhand properties that can be combined into one shorthand property.
  3. <!-- prettier-ignore -->
  4. ```css
  5. a {
  6. padding-top: 1px;
  7. padding-right: 2px;
  8. padding-bottom: 3px;
  9. padding-left: 4px; }
  10. /** ↑
  11. * These longhand properties */
  12. ```
  13. The longhand properties in the example above can be more concisely written as:
  14. <!-- prettier-ignore -->
  15. ```css
  16. a {
  17. padding: 1px 2px 3px 4px;
  18. }
  19. ```
  20. This rule will only complain if you've used the longhand equivalent of _all_ the properties that the shorthand will set.
  21. This rule complains when the following shorthand properties can be used:
  22. - `margin`
  23. - `padding`
  24. - `background`
  25. - `font`
  26. - `border`
  27. - `border-top`
  28. - `border-bottom`
  29. - `border-left`
  30. - `border-right`
  31. - `border-width`
  32. - `border-style`
  33. - `border-color`
  34. - `list-style`
  35. - `border-radius`
  36. - `transition`
  37. - `animation`
  38. - `border-block-end`
  39. - `border-block-start`
  40. - `border-image`
  41. - `border-inline-end`
  42. - `border-inline-start`
  43. - `column-rule`
  44. - `columns`
  45. - `flex`
  46. - `flex-flow`
  47. - `grid`
  48. - `grid-area`
  49. - `grid-column`
  50. - `grid-gap`
  51. - `grid-row`
  52. - `grid-template`
  53. - `outline`
  54. - `text-decoration`
  55. - `text-emphasis`
  56. - `mask`
  57. **Please note** that properties are considered to be redundant if they may be written shorthand according to the specification, **regardless of the behavior of any individual browser**. For example, due to Internet Explorer's implementation of Flexbox, [it may not be possible to use the shorthand property `flex`](https://github.com/philipwalton/flexbugs#flexbug-8), but the longhand form is still considered a violation.
  58. Flexbox-related properties can be ignored using `ignoreShorthands: ["/flex/"]` (see below).
  59. ## Options
  60. ### `true`
  61. The following patterns are considered violations:
  62. <!-- prettier-ignore -->
  63. ```css
  64. a {
  65. margin-top: 1px;
  66. margin-right: 2px;
  67. margin-bottom: 3px;
  68. margin-left: 4px;
  69. }
  70. ```
  71. <!-- prettier-ignore -->
  72. ```css
  73. a {
  74. font-style: italic;
  75. font-variant: normal;
  76. font-weight: bold;
  77. font-stretch: normal;
  78. font-size: 14px;
  79. line-height: 1.2;
  80. font-family: serif;
  81. }
  82. ```
  83. <!-- prettier-ignore -->
  84. ```css
  85. a {
  86. -webkit-transition-property: top;
  87. -webkit-transition-duration: 2s;
  88. -webkit-transition-timing-function: ease;
  89. -webkit-transition-delay: 0.5s;
  90. }
  91. ```
  92. The following patterns are _not_ considered violations:
  93. <!-- prettier-ignore -->
  94. ```css
  95. a {
  96. margin: 1px 2px 3px 4px;
  97. }
  98. ```
  99. <!-- prettier-ignore -->
  100. ```css
  101. a {
  102. font: italic normal bold normal 14px/1.2 serif;
  103. }
  104. ```
  105. <!-- prettier-ignore -->
  106. ```css
  107. a {
  108. -webkit-transition: top 2s ease 0.5s;
  109. }
  110. ```
  111. <!-- prettier-ignore -->
  112. ```css
  113. a {
  114. margin-top: 1px;
  115. margin-right: 2px;
  116. }
  117. ```
  118. <!-- prettier-ignore -->
  119. ```css
  120. a {
  121. margin-top: 1px;
  122. margin-right: 2px;
  123. margin-bottom: 3px;
  124. }
  125. ```
  126. ## Optional secondary options
  127. ### `ignoreShorthands: ["/regex/", /regex/, "string"]`
  128. Given:
  129. ```
  130. ["padding", "/border/"]
  131. ```
  132. The following patterns are _not_ considered violations:
  133. <!-- prettier-ignore -->
  134. ```css
  135. a {
  136. padding-top: 20px;
  137. padding-right: 10px;
  138. padding-bottom: 30px;
  139. padding-left: 10px;
  140. }
  141. ```
  142. <!-- prettier-ignore -->
  143. ```css
  144. a {
  145. border-top-width: 1px;
  146. border-bottom-width: 1px;
  147. border-left-width: 1px;
  148. border-right-width: 1px;
  149. }
  150. ```
  151. <!-- prettier-ignore -->
  152. ```css
  153. a {
  154. border-top-width: 1px;
  155. border-bottom-width: 1px;
  156. border-left-width: 1px;
  157. border-right-width: 1px;
  158. }
  159. ```
  160. <!-- prettier-ignore -->
  161. ```css
  162. a {
  163. border-top-color: green;
  164. border-top-style: double;
  165. border-top-width: 7px;
  166. }
  167. ```