UNPKG

638 BMarkdownView Raw
1# custom-media-pattern
2
3Specify a pattern for custom media query names.
4
5<!-- prettier-ignore -->
6```css
7@custom-media --foo (max-width: 30em);
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```js
21"foo-.+";
22```
23
24The following patterns are considered violations:
25
26<!-- prettier-ignore -->
27```css
28@custom-media --bar (min-width: 30em);
29```
30
31The following patterns are _not_ considered violations:
32
33<!-- prettier-ignore -->
34```css
35@custom-media --foo-bar (min-width: 30em);
36```