Skip to content

Commit 2137027

Browse files
committed
allow hash(#) for property name
1 parent 7b0b966 commit 2137027

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ module.exports = function(css, options){
181181
var pos = position();
182182

183183
// prop
184-
var prop = match(/^(\*?[-\/\*\w]+(\[[0-9a-z_-]+\])?)\s*/);
184+
var prop = match(/^(\*?[-#\/\*\w]+(\[[0-9a-z_-]+\])?)\s*/);
185185
if (!prop) return;
186186
prop = trim(prop[0]);
187187

test/cases/wtf.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.wtf {
22
*overflow-x: hidden;
33
//max-height: 110px;
4+
#height: 18px;
45
}

test/cases/wtf.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,22 @@
3939
},
4040
"source": "wtf.css"
4141
}
42+
},
43+
{
44+
"type": "declaration",
45+
"property": "#height",
46+
"value": "18px",
47+
"position": {
48+
"start": {
49+
"line": 4,
50+
"column": 3
51+
},
52+
"end": {
53+
"line": 4,
54+
"column": 16
55+
},
56+
"source": "wtf.css"
57+
}
4258
}
4359
],
4460
"position": {
@@ -47,7 +63,7 @@
4763
"column": 1
4864
},
4965
"end": {
50-
"line": 4,
66+
"line": 5,
5167
"column": 2
5268
},
5369
"source": "wtf.css"

0 commit comments

Comments
 (0)