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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  1. # at-rule-empty-line-before
  2. Require or disallow an empty line before at-rules.
  3. <!-- prettier-ignore -->
  4. ```css
  5. a {}
  6. /* ← */
  7. @media {} /* ↑ */
  8. /** ↑
  9. * This line */
  10. ```
  11. This rule ignores:
  12. - at-rules that are the very first node in the source
  13. - `@import` in Less.
  14. The [`fix` option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule. We recommend to enable [`indentation`](../indentation/README.md) rule for better autofixing results with this rule.
  15. ## Options
  16. `string`: `"always"|"never"`
  17. ### `"always"`
  18. There _must always_ be an empty line before at-rules.
  19. The following patterns are considered violations:
  20. <!-- prettier-ignore -->
  21. ```css
  22. a {} @media {}
  23. ```
  24. <!-- prettier-ignore -->
  25. ```css
  26. a {}
  27. @media {}
  28. ```
  29. The following patterns are _not_ considered violations:
  30. <!-- prettier-ignore -->
  31. ```css
  32. a {}
  33. @media {}
  34. ```
  35. ### `"never"`
  36. There _must never_ be an empty line before at-rules.
  37. The following patterns are considered violations:
  38. <!-- prettier-ignore -->
  39. ```css
  40. a {}
  41. @media {}
  42. ```
  43. The following patterns are _not_ considered violations:
  44. <!-- prettier-ignore -->
  45. ```css
  46. a {} @media {}
  47. ```
  48. <!-- prettier-ignore -->
  49. ```css
  50. a {}
  51. @media {}
  52. ```
  53. ## Optional secondary options
  54. ### `except: ["after-same-name", "inside-block", "blockless-after-same-name-blockless", "blockless-after-blockless", "first-nested"]`
  55. #### `"after-same-name"`
  56. Reverse the primary option for at-rules that follow another at-rule with the same name.
  57. This means that you can group your at-rules by name.
  58. For example, with `"always"`:
  59. The following patterns are _not_ considered violations:
  60. <!-- prettier-ignore -->
  61. ```css
  62. @charset "UTF-8";
  63. @import url(x.css);
  64. @import url(y.css);
  65. @media (min-width: 100px) {}
  66. @media (min-width: 200px) {}
  67. ```
  68. <!-- prettier-ignore -->
  69. ```css
  70. a {
  71. @extends .foo;
  72. @extends .bar;
  73. @include x;
  74. @include y {}
  75. }
  76. ```
  77. #### `"inside-block"`
  78. Reverse the primary option for at-rules that are inside a block.
  79. For example, with `"always"`:
  80. The following patterns are considered violations:
  81. <!-- prettier-ignore -->
  82. ```css
  83. a {
  84. @extend foo;
  85. color: pink;
  86. }
  87. b {
  88. color: pink;
  89. @extend foo;
  90. }
  91. ```
  92. The following patterns are _not_ considered violations:
  93. <!-- prettier-ignore -->
  94. ```css
  95. a {
  96. @extend foo;
  97. color: pink;
  98. }
  99. b {
  100. color: pink;
  101. @extend foo;
  102. }
  103. ```
  104. #### `"blockless-after-same-name-blockless"`
  105. Reverse the primary option for blockless at-rules that follow another blockless at-rule with the same name.
  106. This means that you can group your blockless at-rules by name.
  107. Shared-line comments do not affect this option.
  108. For example, with `"always"`:
  109. The following patterns are _not_ considered violations:
  110. <!-- prettier-ignore -->
  111. ```css
  112. @charset "UTF-8";
  113. @import url(x.css);
  114. @import url(y.css);
  115. ```
  116. <!-- prettier-ignore -->
  117. ```css
  118. @charset "UTF-8";
  119. @import url(x.css); /* comment */
  120. @import url(y.css);
  121. ```
  122. <!-- prettier-ignore -->
  123. ```css
  124. a {
  125. @extends .foo;
  126. @extends .bar;
  127. @include loop;
  128. @include doo;
  129. }
  130. ```
  131. #### `"blockless-after-blockless"`
  132. Reverse the primary option for blockless at-rules that follow another blockless at-rule.
  133. Shared-line comments do not affect this option.
  134. For example, with `"always"`:
  135. The following patterns are considered violations:
  136. <!-- prettier-ignore -->
  137. ```css
  138. @import url(x.css);
  139. @import url(y.css);
  140. @media print {}
  141. ```
  142. The following patterns are _not_ considered violations:
  143. <!-- prettier-ignore -->
  144. ```css
  145. @import url(x.css);
  146. @import url(y.css);
  147. @media print {}
  148. ```
  149. <!-- prettier-ignore -->
  150. ```css
  151. @import url(x.css); /* comment */
  152. @import url(y.css);
  153. @media print {}
  154. ```
  155. #### `"first-nested"`
  156. Reverse the primary option for at-rules that are nested and the first child of their parent node.
  157. For example, with `"always"`:
  158. The following patterns are considered violations:
  159. <!-- prettier-ignore -->
  160. ```css
  161. a {
  162. @extend foo;
  163. color: pink;
  164. }
  165. b {
  166. color: pink;
  167. @extend foo;
  168. }
  169. ```
  170. The following patterns are _not_ considered violations:
  171. <!-- prettier-ignore -->
  172. ```css
  173. a {
  174. @extend foo;
  175. color: pink;
  176. }
  177. b {
  178. color: pink;
  179. @extend foo;
  180. }
  181. ```
  182. ### `ignore: ["after-comment", "first-nested", "inside-block", "blockless-after-same-name-blockless", "blockless-after-blockless"]`
  183. #### `"after-comment"`
  184. Ignore at-rules that follow a comment.
  185. Shared-line comments do not trigger this option.
  186. The following patterns are _not_ considered violations:
  187. <!-- prettier-ignore -->
  188. ```css
  189. /* comment */
  190. @media {}
  191. ```
  192. <!-- prettier-ignore -->
  193. ```css
  194. /* comment */
  195. @media {}
  196. ```
  197. <!-- prettier-ignore -->
  198. ```css
  199. @media {} /* comment */
  200. @media {}
  201. ```
  202. #### `"first-nested"`
  203. Ignore at-rules that are nested and the first child of their parent node.
  204. For example, with `"always"`:
  205. The following patterns are _not_ considered violations:
  206. <!-- prettier-ignore -->
  207. ```css
  208. @supports {
  209. @media {}
  210. @media {}
  211. }
  212. ```
  213. #### `"inside-block"`
  214. Ignore at-rules that are inside a block.
  215. For example, with `"always"`:
  216. The following patterns are _not_ considered violations:
  217. <!-- prettier-ignore -->
  218. ```css
  219. a {
  220. @extend foo;
  221. color: pink;
  222. }
  223. a {
  224. @extend foo;
  225. color: pink;
  226. }
  227. b {
  228. color: pink;
  229. @extend foo;
  230. }
  231. b {
  232. color: pink;
  233. @extend foo;
  234. }
  235. ```
  236. #### `"blockless-after-same-name-blockless"`
  237. Ignore blockless at-rules that follow another blockless at-rule with the same name.
  238. This means that you can group your blockless at-rules by name.
  239. For example, with `"always"`:
  240. The following patterns are _not_ considered violations:
  241. <!-- prettier-ignore -->
  242. ```css
  243. @charset "UTF-8";
  244. @import url(x.css);
  245. @import url(y.css);
  246. ```
  247. <!-- prettier-ignore -->
  248. ```css
  249. a {
  250. @extends .foo;
  251. @extends .bar;
  252. @include loop;
  253. @include doo;
  254. }
  255. ```
  256. #### `"blockless-after-blockless"`
  257. Ignore blockless at-rules that follow another blockless at-rule.
  258. For example, with `"always"`:
  259. The following patterns are _not_ considered violations:
  260. <!-- prettier-ignore -->
  261. ```css
  262. @import url(x.css);
  263. @import url(y.css);
  264. @media print {}
  265. ```
  266. <!-- prettier-ignore -->
  267. ```css
  268. @import url(x.css);
  269. @import url(y.css);
  270. @media print {}
  271. ```
  272. ### `ignoreAtRules: ["array", "of", "at-rules"]`
  273. Ignore specified at-rules.
  274. For example, with `"always"`.
  275. Given:
  276. ```
  277. ["import"]
  278. ```
  279. The following patterns are _not_ considered violations:
  280. <!-- prettier-ignore -->
  281. ```css
  282. @charset "UTF-8";
  283. @import {}
  284. ```