We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 25a9a0a + 22acc6f commit e2654fbCopy full SHA for e2654fb
parser.js
@@ -27,11 +27,28 @@ let UNITLESS = {
27
'stroke-width': true
28
}
29
30
+let { fromCharCode } = String;
31
+
32
function dashify(str) {
- return str
- .replace(/([A-Z])/g, '-$1')
33
- .replace(/^ms-/, '-ms-')
34
- .toLowerCase()
+ let result = '';
+ let i = 0;
35
+ let len = str.length;
36
+ let code;
37
38
+ if (str[0] === 'm' && str[1] === 's') result += fromCharCode(45); // '-'
39
40
+ for (; i < len; i++) {
41
+ code = str[i].charCodeAt(0);
42
43
+ if (code > 64 && code < 91) {
44
+ result += fromCharCode(45) + fromCharCode(code + 32);
45
+ continue;
46
+ }
47
48
+ result += fromCharCode(code);
49
50
51
+ return result;
52
53
54
function decl(parent, name, value) {
0 commit comments