File tree 5 files changed +1206
-585
lines changed
5 files changed +1206
-585
lines changed Original file line number Diff line number Diff line change 3
3
- " 6"
4
4
- " 8"
5
5
- " 10"
6
- - " 11 "
6
+ - " 12 "
7
7
script : npm run travis
8
8
9
9
after_success :
Original file line number Diff line number Diff line change @@ -28,11 +28,17 @@ Pass arbitrary values between your module files
28
28
``` css
29
29
/* my-component.css */
30
30
/* alias paths for other values or composition */
31
- @value colors: "./colors.css";
31
+ @value colors: "./colors.css";
32
32
/* import multiple from a single file */
33
33
@value primary, secondary from colors;
34
34
/* make local aliases to imported values */
35
35
@value small as bp-small, large as bp-large from "./breakpoints.css";
36
+ /* value as selector name */
37
+ @value selectorValue: secondary-color;
38
+
39
+ .selectorValue {
40
+ color : secondary;
41
+ }
36
42
37
43
.header {
38
44
composes : text-primary from colors;
74
80
- Josh Johnston
75
81
76
82
---
83
+
77
84
Glen Maddern, 2015.
Original file line number Diff line number Diff line change 35
35
"codecov.io" : " ^0.1.2" ,
36
36
"coveralls" : " ^3.0.2" ,
37
37
"eslint" : " ^5.9.0" ,
38
- "mocha" : " ^5.2.0 " ,
39
- "nyc" : " ^13 .1.0"
38
+ "mocha" : " ^6.1.4 " ,
39
+ "nyc" : " ^14 .1.0"
40
40
},
41
41
"dependencies" : {
42
42
"icss-utils" : " ^4.0.0" ,
Original file line number Diff line number Diff line change @@ -55,7 +55,21 @@ describe('constants', () => {
55
55
) ;
56
56
} ) ;
57
57
58
- it ( 'should import and re-export a simple constant' , ( ) => {
58
+ it ( 'should replace selectors within the file #1' , ( ) => {
59
+ test (
60
+ '@value colorValue red; #colorValue { color: colorValue; }' ,
61
+ ':export {\n colorValue: red;\n}\n#red { color: red; }'
62
+ ) ;
63
+ } ) ;
64
+
65
+ it ( 'should replace selectors within the file #2' , ( ) => {
66
+ test (
67
+ '@value colorValue red; .colorValue > .colorValue { color: colorValue; }' ,
68
+ ':export {\n colorValue: red;\n}\n.red > .red { color: red; }'
69
+ ) ;
70
+ } ) ;
71
+
72
+ it . only ( 'should import and re-export a simple constant' , ( ) => {
59
73
test (
60
74
'@value red from "./colors.css";' ,
61
75
':import("./colors.css") {\n i__const_red_0: red\n}\n:export {\n red: i__const_red_0\n}'
You can’t perform that action at this time.
0 commit comments