.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / rules / function-name-case / README.md
1 # function-name-case
2
3 Specify lowercase or uppercase for function names.
4
5 ```css
6 a { width: calc(5% - 10em); }
7 /**        ↑
8  * These functions */
9 ```
10
11 Camel case function names, e.g. `translateX`, are accounted for when the `lower` option is used.
12
13 ## Options
14
15 `string`: `"lower"|"upper"`
16
17 ### `"lower"`
18
19 The following patterns are considered violations:
20
21 ```css
22 a {
23   width: Calc(5% - 10em);
24 }
25 ```
26
27 ```css
28 a {
29   width: cAlC(5% - 10em);
30 }
31 ```
32
33 ```css
34 a {
35   width: CALC(5% - 10em);
36 }
37 ```
38
39 ```css
40 a {
41   background: -WEBKIT-RADIAL-GRADIENT(red, green, blue);
42 }
43 ```
44
45 The following patterns are *not* considered violations:
46
47 ```css
48 a {
49   width: calc(5% - 10em);
50 }
51 ```
52
53 ```css
54 a {
55   background: -webkit-radial-gradient(red, green, blue);
56 }
57 ```
58
59 ### `"upper"`
60
61 The following patterns are considered violations:
62
63 ```css
64 a {
65   width: Calc(5% - 10em);
66 }
67 ```
68
69 ```css
70 a {
71   width: cAlC(5% - 10em);
72 }
73 ```
74
75 ```css
76 a {
77   width: calc(5% - 10em);
78 }
79 ```
80
81 ```css
82 a {
83   background: -webkit-radial-gradient(red, green, blue);
84 }
85 ```
86
87 The following patterns are *not* considered violations:
88
89 ```css
90 a {
91   width: CALC(5% - 10em);
92 }
93 ```
94
95 ```css
96 a {
97   background: -WEBKIT-RADIAL-GRADIENT(red, green, blue);
98 }
99 ```
100
101 ## Optional secondary options
102
103 ### `ignoreFunctions: ["/regex/", "non-regex"]`
104
105 Ignore case of function names.
106
107 For example, with `"lower"`.
108
109 Given:
110
111 ```js
112 ["some-function", "/^get.*$/"]
113 ```
114
115 The following patterns are considered violations:
116
117 ```css
118 a {
119   color: sOmE-FuNcTiOn();
120 }
121 ```
122
123 ```css
124 a {
125   color: some-other-function();
126 }
127 ```
128
129 ```css
130 a {
131   color: GetColor();
132 }
133 ```
134
135 ```css
136 a {
137   color: GET_COLOR();
138 }
139 ```
140
141 The following patterns are *not* considered violations:
142
143 ```css
144 a {
145   display: some-function();
146 }
147 ```
148
149
150 ```css
151 a {
152   display: getColor();
153 }
154 ```
155
156 ```css
157 a {
158   display: get_color();
159 }
160 ```
161