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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. # stylelint-config-standard
  2. [![NPM version](https://img.shields.io/npm/v/stylelint-config-standard.svg)](https://www.npmjs.org/package/stylelint-config-standard) [![Build Status](https://github.com/stylelint/stylelint-config-standard/workflows/CI/badge.svg)](https://github.com/stylelint/stylelint-config-standard/actions)
  3. > The standard shareable config for stylelint.
  4. Extends [`stylelint-config-recommended`](https://github.com/stylelint/stylelint-config-recommended).
  5. Turns on additional rules to enforce the common stylistic conventions found within a handful of CSS styleguides, including: [The Idiomatic CSS Principles](https://github.com/necolas/idiomatic-css),
  6. [Google's CSS Style Guide](https://google.github.io/styleguide/htmlcssguide.html#CSS_Formatting_Rules), [Airbnb's Styleguide](https://github.com/airbnb/css#css), and [@mdo's Code Guide](https://codeguide.co/#css).
  7. It favours flexibility over strictness for things like multi-line lists and single-line rulesets, and tries to avoid potentially divisive rules.
  8. Use it as is or as a foundation for your own config.
  9. To see the rules that this config uses, please read the [config itself](./index.js).
  10. ## Example
  11. <!-- prettier-ignore -->
  12. ```css
  13. @import url(x.css);
  14. @import url(y.css);
  15. /**
  16. * Multi-line comment
  17. */
  18. .selector-1,
  19. .selector-2,
  20. .selector-3[type="text"] {
  21. background: linear-gradient(#fff, rgba(0, 0, 0, 0.8));
  22. box-sizing: border-box;
  23. display: block;
  24. color: #333;
  25. }
  26. .selector-a,
  27. .selector-b:not(:first-child) {
  28. padding: 10px !important;
  29. top: calc(calc(1em * 2) / 3);
  30. }
  31. .selector-x { width: 10%; }
  32. .selector-y { width: 20%; }
  33. .selector-z { width: 30%; }
  34. /* Single-line comment */
  35. @media (min-width >= 60em) {
  36. .selector {
  37. /* Flush to parent comment */
  38. transform: translate(1, 1) scale(3);
  39. }
  40. }
  41. @media (orientation: portrait), projection and (color) {
  42. .selector-i + .selector-ii {
  43. background: color(rgb(0, 0, 0) lightness(50%));
  44. font-family: helvetica, "arial black", sans-serif;
  45. }
  46. }
  47. /* Flush single line comment */
  48. @media
  49. screen and (min-resolution: 192dpi),
  50. screen and (min-resolution: 2dppx) {
  51. .selector {
  52. background-image:
  53. repeating-linear-gradient(
  54. -45deg,
  55. transparent,
  56. #fff 25px,
  57. rgba(255, 255, 255, 1) 50px
  58. );
  59. margin: 10px;
  60. margin-bottom: 5px;
  61. box-shadow:
  62. 0 1px 1px #000,
  63. 0 1px 0 #fff,
  64. 2px 2px 1px 1px #ccc inset;
  65. height: 10rem;
  66. }
  67. /* Flush nested single line comment */
  68. .selector::after {
  69. content: '→';
  70. background-image: url(x.svg);
  71. }
  72. }
  73. ```
  74. _Note: the config is tested against this example, as such the example contains plenty of CSS syntax, formatting and features._
  75. ## Installation
  76. ```bash
  77. npm install stylelint-config-standard --save-dev
  78. ```
  79. ## Usage
  80. If you've installed `stylelint-config-standard` locally within your project, just set your `stylelint` config to:
  81. ```json
  82. {
  83. "extends": "stylelint-config-standard"
  84. }
  85. ```
  86. If you've globally installed `stylelint-config-standard` using the `-g` flag, then you'll need to use the absolute path to `stylelint-config-standard` in your config e.g.
  87. ```json
  88. {
  89. "extends": "/absolute/path/to/stylelint-config-standard"
  90. }
  91. ```
  92. Since [stylelint 9.7.0](https://github.com/stylelint/stylelint/blob/9.7.0/CHANGELOG.md#970), you can simply use the globally installed configuration name instead of the absolute path:
  93. ```json
  94. {
  95. "extends": "stylelint-config-standard"
  96. }
  97. ```
  98. ### Extending the config
  99. Simply add a `"rules"` key to your config, then add your overrides and additions there.
  100. For example, to change the `at-rule-no-unknown` rule to use its `ignoreAtRules` option, change the `indentation` to tabs, turn off the `number-leading-zero` rule,and add the `unit-allowed-list` rule:
  101. ```json
  102. {
  103. "extends": "stylelint-config-standard",
  104. "rules": {
  105. "at-rule-no-unknown": [
  106. true,
  107. {
  108. "ignoreAtRules": ["extends", "ignores"]
  109. }
  110. ],
  111. "indentation": "tab",
  112. "number-leading-zero": null,
  113. "unit-allowed-list": ["em", "rem", "s"]
  114. }
  115. }
  116. ```
  117. #### Suggested additions
  118. `stylelint-config-standard` is a great foundation for your own config. You can extend it to create a tailored and much stricter config:
  119. - Specify what quotes must be used using:
  120. - [`font-family-name-quotes`](https://github.com/stylelint/stylelint/blob/master/lib/rules/font-family-name-quotes/README.md)
  121. - [`function-url-quotes`](https://github.com/stylelint/stylelint/blob/master/lib/rules/function-url-quotes/README.md)
  122. - [`selector-attribute-quotes`](https://github.com/stylelint/stylelint/blob/master/lib/rules/selector-attribute-quotes/README.md)
  123. - [`string-quotes`](https://github.com/stylelint/stylelint/blob/master/lib/rules/string-quotes/README.md)
  124. - If you use [`autoprefixer`](https://github.com/postcss/autoprefixer) you'll want to disallow vendor prefixes using:
  125. - [`at-rule-no-vendor-prefix`](https://github.com/stylelint/stylelint/blob/master/lib/rules/at-rule-no-vendor-prefix/README.md)
  126. - [`media-feature-name-no-vendor-prefix`](https://github.com/stylelint/stylelint/blob/master/lib/rules/media-feature-name-no-vendor-prefix/README.md)
  127. - [`property-no-vendor-prefix`](https://github.com/stylelint/stylelint/blob/master/lib/rules/property-no-vendor-prefix/README.md)
  128. - [`selector-no-vendor-prefix`](https://github.com/stylelint/stylelint/blob/master/lib/rules/selector-no-vendor-prefix/README.md)
  129. - [`value-no-vendor-prefix`](https://github.com/stylelint/stylelint/blob/master/lib/rules/value-no-vendor-prefix/README.md)
  130. - Control specificity using:
  131. - [`max-nesting-depth`](https://github.com/stylelint/stylelint/blob/master/lib/rules/max-nesting-depth/README.md)
  132. - [`selector-max-compound-selectors`](https://github.com/stylelint/stylelint/blob/master/lib/rules/selector-max-compound-selectors/README.md)
  133. - [`selector-max-specificity`](https://github.com/stylelint/stylelint/blob/master/lib/rules/selector-max-specificity/README.md)
  134. - Specify acceptable selector types, units, properties, functions and words in comments using:
  135. - [`at-rule-disallowed-list`](https://github.com/stylelint/stylelint/blob/master/lib/rules/at-rule-disallowed-list/README.md)
  136. - [`at-rule-allowed-list`](https://github.com/stylelint/stylelint/blob/master/lib/rules/at-rule-allowed-list/README.md)
  137. - [`color-named`](https://github.com/stylelint/stylelint/blob/master/lib/rules/color-named/README.md)
  138. - [`color-no-hex`](https://github.com/stylelint/stylelint/blob/master/lib/rules/color-no-hex/README.md)
  139. - [`comment-word-disallowed-list`](https://github.com/stylelint/stylelint/blob/master/lib/rules/comment-word-disallowed-list/README.md)
  140. - [`declaration-no-important`](https://github.com/stylelint/stylelint/blob/master/lib/rules/declaration-no-important/README.md)
  141. - [`declaration-property-unit-disallowed-list`](https://github.com/stylelint/stylelint/blob/master/lib/rules/declaration-property-unit-disallowed-list/README.md)
  142. - [`declaration-property-unit-allowed-list`](https://github.com/stylelint/stylelint/blob/master/lib/rules/declaration-property-unit-allowed-list/README.md)
  143. - [`declaration-property-value-disallowed-list`](https://github.com/stylelint/stylelint/blob/master/lib/rules/declaration-property-value-disallowed-list/README.md)
  144. - [`declaration-property-value-allowed-list`](https://github.com/stylelint/stylelint/blob/master/lib/rules/declaration-property-value-allowed-list/README.md)
  145. - [`function-disallowed-list`](https://github.com/stylelint/stylelint/blob/master/lib/rules/function-disallowed-list/README.md)
  146. - [`function-url-scheme-disallowed-list`](https://github.com/stylelint/stylelint/blob/master/lib/rules/function-url-scheme-disallowed-list/README.md)
  147. - [`function-url-scheme-allowed-list`](https://github.com/stylelint/stylelint/blob/master/lib/rules/function-url-scheme-allowed-list/README.md)
  148. - [`function-allowed-list`](https://github.com/stylelint/stylelint/blob/master/lib/rules/function-allowed-list/README.md)
  149. - [`media-feature-name-disallowed-list`](https://github.com/stylelint/stylelint/blob/master/lib/rules/media-feature-name-disallowed-list/README.md)
  150. - [`media-feature-name-allowed-list`](https://github.com/stylelint/stylelint/blob/master/lib/rules/media-feature-name-allowed-list/README.md)
  151. - [`property-disallowed-list`](https://github.com/stylelint/stylelint/blob/master/lib/rules/property-disallowed-list/README.md)
  152. - [`property-allowed-list`](https://github.com/stylelint/stylelint/blob/master/lib/rules/property-allowed-list/README.md)
  153. - [`selector-attribute-operator-disallowed-list`](https://github.com/stylelint/stylelint/blob/master/lib/rules/selector-attribute-operator-disallowed-list/README.md)
  154. - [`selector-attribute-operator-allowed-list`](https://github.com/stylelint/stylelint/blob/master/lib/rules/selector-attribute-operator-allowed-list/README.md)
  155. - [`selector-combinator-disallowed-list`](https://github.com/stylelint/stylelint/blob/master/lib/rules/selector-combinator-disallowed-list/README.md)
  156. - [`selector-combinator-allowed-list`](https://github.com/stylelint/stylelint/blob/master/lib/rules/selector-combinator-allowed-list/README.md)
  157. - [`selector-max-class`](https://github.com/stylelint/stylelint/blob/master/lib/rules/selector-max-class/README.md)
  158. - [`selector-max-attribute`](https://github.com/stylelint/stylelint/blob/master/lib/rules/selector-max-attribute/README.md)
  159. - [`selector-max-combinators`](https://github.com/stylelint/stylelint/blob/master/lib/rules/selector-max-combinators/README.md)
  160. - [`selector-max-id`](https://github.com/stylelint/stylelint/blob/master/lib/rules/selector-max-id/README.md)
  161. - [`selector-max-pseudo-class`](https://github.com/stylelint/stylelint/blob/master/lib/rules/selector-max-pseudo-class/README.md)
  162. - [`selector-no-qualifying-type`](https://github.com/stylelint/stylelint/blob/master/lib/rules/selector-no-qualifying-type/README.md)
  163. - [`selector-max-type`](https://github.com/stylelint/stylelint/blob/master/lib/rules/selector-max-type/README.md)
  164. - [`selector-max-universal`](https://github.com/stylelint/stylelint/blob/master/lib/rules/selector-max-universal/README.md)
  165. - [`selector-pseudo-class-disallowed-list`](https://github.com/stylelint/stylelint/blob/master/lib/rules/selector-pseudo-class-disallowed-list/README.md)
  166. - [`selector-pseudo-class-allowed-list`](https://github.com/stylelint/stylelint/blob/master/lib/rules/selector-pseudo-class-allowed-list/README.md)
  167. - [`selector-pseudo-element-disallowed-list`](https://github.com/stylelint/stylelint/blob/master/lib/rules/selector-pseudo-element-disallowed-list/README.md)
  168. - [`selector-pseudo-element-allowed-list`](https://github.com/stylelint/stylelint/blob/master/lib/rules/selector-pseudo-element-allowed-list/README.md)
  169. - [`unit-disallowed-list`](https://github.com/stylelint/stylelint/blob/master/lib/rules/unit-disallowed-list/README.md)
  170. - [`unit-allowed-list`](https://github.com/stylelint/stylelint/blob/master/lib/rules/unit-allowed-list/README.md)
  171. - Specify acceptable naming patterns using:
  172. - [`custom-media-pattern`](https://github.com/stylelint/stylelint/blob/master/lib/rules/custom-media-pattern/README.md)
  173. - [`custom-property-pattern`](https://github.com/stylelint/stylelint/blob/master/lib/rules/custom-property-pattern/README.md)
  174. - [`selector-class-pattern`](https://github.com/stylelint/stylelint/blob/master/lib/rules/selector-class-pattern/README.md)
  175. - [`selector-id-pattern`](https://github.com/stylelint/stylelint/blob/master/lib/rules/selector-id-pattern/README.md)
  176. - [`selector-nested-pattern`](https://github.com/stylelint/stylelint/blob/master/lib/rules/selector-nested-pattern/README.md)
  177. - Specify a notation when there are one or more valid representations using:
  178. - [`font-weight-notation`](https://github.com/stylelint/stylelint/blob/master/lib/rules/font-weight-notation/README.md)
  179. - Specify what types of URLs are allowed using:
  180. - [`function-url-no-scheme-relative`](https://github.com/stylelint/stylelint/blob/master/lib/rules/function-url-no-scheme-relative/README.md)
  181. - Specify a maximum line length using:
  182. - [`max-line-length`](https://github.com/stylelint/stylelint/blob/master/lib/rules/max-line-length/README.md)
  183. ### Using the config with SugarSS syntax
  184. The config is broadly compatible with [SugarSS](https://github.com/postcss/sugarss) syntax. You _will_ need to turn off the rules that check braces and semicolons, as so:
  185. ```json
  186. {
  187. "extends": "stylelint-config-standard",
  188. "rules": {
  189. "block-closing-brace-empty-line-before": null,
  190. "block-closing-brace-newline-after": null,
  191. "block-closing-brace-newline-before": null,
  192. "block-closing-brace-space-before": null,
  193. "block-opening-brace-newline-after": null,
  194. "block-opening-brace-space-after": null,
  195. "block-opening-brace-space-before": null,
  196. "declaration-block-semicolon-newline-after": null,
  197. "declaration-block-semicolon-space-after": null,
  198. "declaration-block-semicolon-space-before": null,
  199. "declaration-block-trailing-semicolon": null
  200. }
  201. }
  202. ```
  203. ## [Changelog](CHANGELOG.md)
  204. ## [License](LICENSE)