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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. # string-quotes
  2. Specify single or double quotes around strings.
  3. <!-- prettier-ignore -->
  4. ```css
  5. a[id="foo"] { content: "x"; }
  6. /** ↑ ↑ ↑ ↑
  7. * These quotes and these quotes */
  8. ```
  9. Quotes within comments are ignored.
  10. <!-- prettier-ignore -->
  11. ```css
  12. /* "This is fine" */
  13. /* 'And this is also fine' */
  14. ```
  15. Single quotes in a charset @-rule are ignored as using single quotes in this context is incorrect according the [CSS specification](https://www.w3.org/TR/CSS2/syndata.html#x57).
  16. <!-- prettier-ignore -->
  17. ```css
  18. @charset "utf-8"
  19. /* fine regardless of configuration */
  20. ```
  21. The [`fix` option](../../../docs/user-guide/usage/options.md#fix) can automatically fix most of the problems reported by this rule.
  22. ## Options
  23. `string`: `"single"|"double"`
  24. ### `"single"`
  25. Strings _must always_ be wrapped with single quotes.
  26. The following patterns are considered violations:
  27. <!-- prettier-ignore -->
  28. ```css
  29. a { content: "x"; }
  30. ```
  31. <!-- prettier-ignore -->
  32. ```css
  33. a[id="foo"] {}
  34. ```
  35. The following patterns are _not_ considered violations:
  36. <!-- prettier-ignore -->
  37. ```css
  38. a { content: 'x'; }
  39. ```
  40. <!-- prettier-ignore -->
  41. ```css
  42. a[id='foo'] {}
  43. ```
  44. <!-- prettier-ignore -->
  45. ```css
  46. a { content: "x'y'z"; }
  47. ```
  48. ### `"double"`
  49. Strings _must always_ be wrapped with double quotes.
  50. The following patterns are considered violations:
  51. <!-- prettier-ignore -->
  52. ```css
  53. a { content: 'x'; }
  54. ```
  55. <!-- prettier-ignore -->
  56. ```css
  57. a[id='foo'] {}
  58. ```
  59. The following patterns are _not_ considered violations:
  60. <!-- prettier-ignore -->
  61. ```css
  62. a { content: "x"; }
  63. ```
  64. <!-- prettier-ignore -->
  65. ```css
  66. a[id="foo"] {}
  67. ```
  68. <!-- prettier-ignore -->
  69. ```css
  70. a { content: 'x"y"z'; }
  71. ```
  72. ## Optional secondary options
  73. ### `avoidEscape`: `true|false`, defaults to `true`
  74. Allows strings to use single-quotes or double-quotes so long as the string contains a quote that would have to be escaped otherwise.
  75. For example, with `"single", { "avoidEscape" : false }`.
  76. The following patterns are considered violations:
  77. <!-- prettier-ignore -->
  78. ```css
  79. a { content: "x'y'z"; }
  80. ```
  81. <!-- prettier-ignore -->
  82. ```css
  83. a[id="foo'bar'baz"] {}
  84. ```
  85. The following patterns are _not_ considered violations:
  86. <!-- prettier-ignore -->
  87. ```css
  88. a { content: 'x'; }
  89. ```
  90. <!-- prettier-ignore -->
  91. ```css
  92. a[id='foo'] {}
  93. ```