UNPKG

567 BMarkdownView Raw
1# custom-property-pattern
2
3Specify a pattern for custom properties.
4
5<!-- prettier-ignore -->
6```css
7a { --foo-: 1px; }
8/** ↑
9 * The pattern of this */
10```
11
12## Options
13
14`regex|string`
15
16A string will be translated into a RegExp like so `new RegExp(yourString)` — so be sure to escape properly.
17
18Given the string:
19
20```
21"foo-.+"
22```
23
24The following patterns are considered violations:
25
26<!-- prettier-ignore -->
27```css
28:root { --boo-bar: 0; }
29```
30
31The following patterns are _not_ considered violations:
32
33<!-- prettier-ignore -->
34```css
35:root { --foo-bar: 0; }
36```