File tree Expand file tree Collapse file tree 5 files changed +1206
-585
lines changed Expand file tree Collapse file tree 5 files changed +1206
-585
lines changed Original file line number Diff line number Diff line change 33 - " 6"
44 - " 8"
55 - " 10"
6- - " 11 "
6+ - " 12 "
77script : npm run travis
88
99after_success :
Original file line number Diff line number Diff line change @@ -28,11 +28,17 @@ Pass arbitrary values between your module files
2828``` css
2929/* my-component.css */
3030/* alias paths for other values or composition */
31- @value colors: "./colors.css";
31+ @value colors: "./colors.css";
3232/* import multiple from a single file */
3333@value primary, secondary from colors;
3434/* make local aliases to imported values */
3535@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+ }
3642
3743.header {
3844 composes : text-primary from colors;
7480- Josh Johnston
7581
7682---
83+
7784Glen Maddern, 2015.
Original file line number Diff line number Diff line change 3535 "codecov.io" : " ^0.1.2" ,
3636 "coveralls" : " ^3.0.2" ,
3737 "eslint" : " ^5.9.0" ,
38- "mocha" : " ^5.2.0 " ,
39- "nyc" : " ^13 .1.0"
38+ "mocha" : " ^6.1.4 " ,
39+ "nyc" : " ^14 .1.0"
4040 },
4141 "dependencies" : {
4242 "icss-utils" : " ^4.0.0" ,
Original file line number Diff line number Diff line change @@ -55,7 +55,21 @@ describe('constants', () => {
5555 ) ;
5656 } ) ;
5757
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' , ( ) => {
5973 test (
6074 '@value red from "./colors.css";' ,
6175 ':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