File tree Expand file tree Collapse file tree 10 files changed +54
-20
lines changed
Expand file tree Collapse file tree 10 files changed +54
-20
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ object returned:
1919 "stylesheet" : {
2020 "rules" : [
2121 {
22- "selector " : " tobi" ,
22+ "selectors " : [ " tobi" ] ,
2323 "declarations" : [
2424 {
2525 "property" : " name" ,
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ module.exports = function(css){
9696 function selector ( ) {
9797 var m = match ( / ^ ( [ ^ { ] + ) / ) ;
9898 if ( ! m ) return ;
99- return m [ 0 ] . trim ( ) ;
99+ return m [ 0 ] . trim ( ) . split ( / \s * , \s * / ) ;
100100 }
101101
102102 /**
@@ -245,7 +245,7 @@ module.exports = function(css){
245245 var sel = selector ( ) ;
246246 if ( ! sel ) return ;
247247 comments ( ) ;
248- return { selector : sel , declarations : declarations ( ) } ;
248+ return { selectors : sel , declarations : declarations ( ) } ;
249249 }
250250
251251 return stylesheet ( ) ;
Original file line number Diff line number Diff line change 22 "stylesheet" : {
33 "rules" : [
44 {
5- "selector" : " foo" ,
5+ "selectors" : [
6+ " foo"
7+ ],
68 "declarations" : [
79 {
810 "property" : " bar" ,
Original file line number Diff line number Diff line change 55 "media" : " screen, projection" ,
66 "rules" : [
77 {
8- "selector" : " html" ,
8+ "selectors" : [
9+ " html"
10+ ],
911 "declarations" : [
1012 {
1113 "property" : " background" ,
1820 ]
1921 },
2022 {
21- "selector" : " body" ,
23+ "selectors" : [
24+ " body"
25+ ],
2226 "declarations" : [
2327 {
2428 "property" : " max-width" ,
3640 "media" : " print" ,
3741 "rules" : [
3842 {
39- "selector" : " html" ,
43+ "selectors" : [
44+ " html"
45+ ],
4046 "declarations" : [
4147 {
4248 "property" : " background" ,
4955 ]
5056 },
5157 {
52- "selector" : " body" ,
58+ "selectors" : [
59+ " body"
60+ ],
5361 "declarations" : [
5462 {
5563 "property" : " padding" ,
Original file line number Diff line number Diff line change 55 "media" : " screen, projection" ,
66 "rules" : [
77 {
8- "selector" : " html" ,
8+ "selectors" : [
9+ " html"
10+ ],
911 "declarations" : [
1012 {
1113 "property" : " background" ,
1820 ]
1921 },
2022 {
21- "selector" : " body" ,
23+ "selectors" : [
24+ " body"
25+ ],
2226 "declarations" : [
2327 {
2428 "property" : " max-width" ,
3640 "media" : " print" ,
3741 "rules" : [
3842 {
39- "selector" : " html" ,
43+ "selectors" : [
44+ " html"
45+ ],
4046 "declarations" : [
4147 {
4248 "property" : " background" ,
4955 ]
5056 },
5157 {
52- "selector" : " body" ,
58+ "selectors" : [
59+ " body"
60+ ],
5361 "declarations" : [
5462 {
5563 "property" : " padding" ,
Original file line number Diff line number Diff line change 22 "stylesheet" : {
33 "rules" : [
44 {
5- "selector" : " body" ,
5+ "selectors" : [
6+ " body"
7+ ],
68 "declarations" : [
79 {
810 "property" : " foo\n " ,
1113 ]
1214 },
1315 {
14- "selector" : " body" ,
16+ "selectors" : [
17+ " body"
18+ ],
1519 "declarations" : [
1620 {
1721 "property" : " foo" ,
2428 ]
2529 },
2630 {
27- "selector" : " body" ,
31+ "selectors" : [
32+ " body"
33+ ],
2834 "declarations" : [
2935 {
3036 "property" : " foo\n " ,
Original file line number Diff line number Diff line change 22 "stylesheet" : {
33 "rules" : [
44 {
5- "selector" : " tobi loki jane" ,
5+ "selectors" : [
6+ " tobi loki jane"
7+ ],
68 "declarations" : [
79 {
810 "property" : " are" ,
Original file line number Diff line number Diff line change 22 "stylesheet" : {
33 "rules" : [
44 {
5- "selector" : " tobi loki jane" ,
5+ "selectors" : [
6+ " tobi loki jane"
7+ ],
68 "declarations" : [
79 {
810 "property" : " are" ,
Original file line number Diff line number Diff line change 22 "stylesheet" : {
33 "rules" : [
44 {
5- "selector" : " foo" ,
5+ "selectors" : [
6+ " foo"
7+ ],
68 "declarations" : [
79 {
810 "property" : " bar" ,
Original file line number Diff line number Diff line change 22 "stylesheet" : {
33 "rules" : [
44 {
5- "selector" : " tobi" ,
5+ "selectors" : [
6+ " tobi"
7+ ],
68 "declarations" : [
79 {
810 "property" : " name" ,
1113 ]
1214 },
1315 {
14- "selector" : " loki" ,
16+ "selectors" : [
17+ " loki"
18+ ],
1519 "declarations" : [
1620 {
1721 "property" : " name" ,
You can’t perform that action at this time.
0 commit comments