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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  1. # indentation
  2. Specify indentation.
  3. <!-- prettier-ignore -->
  4. ```css
  5. |@media print {
  6. | a {
  7. | ↑ background-position: top left,
  8. | ↑ ↑ top right;
  9. | ↑}↑ ↑
  10. |}↑ ↑ ↑
  11. /** ↑ ↑ ↑
  12. * The indentation at these three points */
  13. ```
  14. The [`fix` option](../../../docs/user-guide/usage/options.md#fix) can automatically fix all of the problems reported by this rule.
  15. ## Options
  16. `int|"tab"`, where `int` is the number of spaces
  17. ### `2`
  18. Always indent at-rules, rules, comments, declarations, inside parentheses and multi-line values by 2 spaces.
  19. The following patterns are considered violations:
  20. <!-- prettier-ignore -->
  21. ```css
  22. @media print {
  23. a {
  24. background-position: top left,
  25. top right;
  26. }
  27. }
  28. ```
  29. <!-- prettier-ignore -->
  30. ```css
  31. @media print {
  32. a {
  33. background-position: top left,
  34. top right;
  35. }
  36. }
  37. ```
  38. <!-- prettier-ignore -->
  39. ```css
  40. @media print {
  41. a {
  42. background-position: top left,
  43. top right;
  44. }
  45. }
  46. ```
  47. <!-- prettier-ignore -->
  48. ```css
  49. @media print {
  50. a,
  51. b {
  52. background-position: top left,
  53. top right;
  54. }
  55. }
  56. ```
  57. <!-- prettier-ignore -->
  58. ```css
  59. a {
  60. /* blergh */
  61. color: pink;
  62. }
  63. /* blergh */
  64. ```
  65. <!-- prettier-ignore -->
  66. ```css
  67. @media print,
  68. (-webkit-min-device-pixel-ratio: 1.25),
  69. (min-resolution: 120dpi) {}
  70. ```
  71. <!-- prettier-ignore -->
  72. ```css
  73. a {
  74. color: rgb(
  75. 255,
  76. 255,
  77. 255
  78. );
  79. top: 0;
  80. }
  81. ```
  82. The following patterns are _not_ considered violations:
  83. <!-- prettier-ignore -->
  84. ```css
  85. @media print {
  86. a {
  87. background-position: top left,
  88. top right;
  89. }
  90. }
  91. ```
  92. <!-- prettier-ignore -->
  93. ```css
  94. @media print {
  95. a,
  96. b {
  97. background-position: top left,
  98. top right;
  99. }
  100. }
  101. ```
  102. <!-- prettier-ignore -->
  103. ```css
  104. a {
  105. /* blergh */
  106. color: pink;
  107. }
  108. /* blergh */
  109. ```
  110. <!-- prettier-ignore -->
  111. ```css
  112. @media print,
  113. (-webkit-min-device-pixel-ratio: 1.25),
  114. (min-resolution: 120dpi) {}
  115. ```
  116. <!-- prettier-ignore -->
  117. ```css
  118. a {
  119. color: rgb(
  120. 255,
  121. 255,
  122. 255
  123. );
  124. top: 0;
  125. }
  126. ```
  127. ## Optional secondary options
  128. ### `baseIndentLevel: int|"auto"`
  129. By default, the indent level of the CSS code block in non-CSS-like files is determined by the shortest indent of non-empty line. The setting `baseIndentLevel` allows you to define a relative indent level based on CSS code block opening or closing line.
  130. For example, with `[ 2, { baseIndentLevel: 1 } ]`, CSS should be indented 1 levels higher than `<style>` tag:
  131. ```html
  132. <!DOCTYPE html>
  133. <html lang="en">
  134. <head>
  135. <style>
  136. a {
  137. display: block;
  138. }
  139. </style>
  140. </head>
  141. </html>
  142. ```
  143. ### `indentInsideParens: "twice"|"once-at-root-twice-in-block"`
  144. By default, _one extra_ indentation (of your specified type) is expected after newlines inside parentheses, and the closing parenthesis is expected to have no extra indentation.
  145. If you would like to change the quantity of extra indentation inside parentheses, use this option.
  146. `"twice"` means you expect two extra indentations (of your specified type) after newlines inside parentheses, and expect the closing parenthesis to have one extra indentation. For example:
  147. <!-- prettier-ignore -->
  148. ```css
  149. a {
  150. color: rgb(
  151. 255,
  152. 255,
  153. 255
  154. );
  155. top: 0;
  156. }
  157. ```
  158. `"once-at-root-twice-in-block"` means two things: You want the behavior of `"once"`, as documented above, when the parenthetical expression is part of a node that is an immediate descendent of the root — i.e. not inside a block. And you want the behavior of `"twice"`, as documented above, when the parenthetical expression is part of a node that is inside a block. For example:
  159. <!-- prettier-ignore -->
  160. ```css
  161. @import (
  162. "foo.css"
  163. );
  164. a {
  165. color: rgb(
  166. 255,
  167. 255,
  168. 255
  169. );
  170. top: 0;
  171. }
  172. ```
  173. ### `indentClosingBrace: true|false`
  174. If `true`, the closing brace of a block (rule or at-rule) will be expected at the same indentation level as the block's inner nodes.
  175. For example, with `indentClosingBrace: true`.
  176. The following patterns are considered violations:
  177. <!-- prettier-ignore -->
  178. ```css
  179. a {
  180. color: pink;
  181. }
  182. ```
  183. <!-- prettier-ignore -->
  184. ```css
  185. @media print {
  186. a {
  187. color: pink;
  188. }
  189. }
  190. ```
  191. The following patterns are _not_ considered violations:
  192. <!-- prettier-ignore -->
  193. ```css
  194. a {
  195. color: pink;
  196. }
  197. ```
  198. <!-- prettier-ignore -->
  199. ```css
  200. @media print {
  201. a {
  202. color: pink;
  203. }
  204. }
  205. ```
  206. ### `except: ["block", "param", "value"]`
  207. Do _not_ indent for these things.
  208. For example, with `2`.
  209. The following patterns are considered violations:
  210. <!-- prettier-ignore -->
  211. ```css
  212. @media print,
  213. (-webkit-min-device-pixel-ratio: 1.25),
  214. (min-resolution: 120dpi) {
  215. a {
  216. background-position: top left,
  217. top right;
  218. }
  219. }
  220. ```
  221. The following patterns are _not_ considered violations:
  222. <!-- prettier-ignore -->
  223. ```css
  224. @media print,
  225. (-webkit-min-device-pixel-ratio: 1.25),
  226. (min-resolution: 120dpi) {
  227. a {
  228. background-position: top left,
  229. top right;
  230. }
  231. }
  232. ```
  233. ### `ignore: ["inside-parens", "param", "value"]`
  234. #### `"inside-parens"`
  235. Ignore the indentation inside parentheses.
  236. For example, with `2`.
  237. The following patterns are _not_ considered violations:
  238. <!-- prettier-ignore -->
  239. ```css
  240. a {
  241. color: rgb(
  242. 255,
  243. 255,
  244. 255
  245. );
  246. top: 0;
  247. }
  248. ```
  249. #### `"param"`
  250. Ignore the indentation of at-rule params.
  251. For example, with `2`.
  252. The following patterns are _not_ considered violations:
  253. <!-- prettier-ignore -->
  254. ```css
  255. @media print,
  256. (-webkit-min-device-pixel-ratio: 1.25),
  257. (min-resolution: 120dpi) {
  258. }
  259. ```
  260. #### `"value"`
  261. Ignore the indentation of values.
  262. For example, with `2`.
  263. The following patterns are _not_ considered violations:
  264. <!-- prettier-ignore -->
  265. ```css
  266. a {
  267. background-position: top left,
  268. top right,
  269. bottom left,
  270. bottom right;
  271. }
  272. ```