File tree Expand file tree Collapse file tree 5 files changed +15
-9
lines changed
test/test-cases/constants Expand file tree Collapse file tree 5 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ let createImportedName = options && options.createImportedName || ((importName/*
11
11
export default css => {
12
12
/* Find any local let rules and store them*/
13
13
let translations = { }
14
- css . eachAtRule ( / ^ - ? l e t $ / , atRule => {
14
+ css . eachAtRule ( / ^ d e f i n e $ / , atRule => {
15
15
let matches
16
16
while ( matches = matchLet . exec ( atRule . params ) ) {
17
17
let [ /*match*/ , key , value ] = matches
@@ -31,7 +31,7 @@ export default css => {
31
31
32
32
/* Find imports and insert ICSS tmp vars */
33
33
let importAliases = [ ]
34
- css . eachAtRule ( / ^ - ? i m p o r t $ / , atRule => {
34
+ css . eachAtRule ( / ^ i m p o r t ( - d e f i n e ) ? $ / , atRule => {
35
35
let matches = matchImports . exec ( atRule . params )
36
36
if ( matches ) {
37
37
let [ /*match*/ , aliases , path ] = matches
Original file line number Diff line number Diff line change 1
- @let small (max-width : 599px );
2
- @let medium (min-width : 600px ) and (max-width : 959px );
3
- @let large (min-width : 960px );
1
+ @define small (max-width : 599px );
2
+ @define medium (min-width : 600px ) and (max-width : 959px );
3
+ @define large (min-width : 960px );
Original file line number Diff line number Diff line change 1
- @let primary: # f01;
2
- @let secondary: # 2f2;
1
+ @define primary: # f01;
2
+ @define secondary: # 2f2;
3
3
4
4
.text-primary {
5
5
color : primary;
Original file line number Diff line number Diff line change 15
15
background-color : # 2f2 ;
16
16
}
17
17
18
+ /* Imports without a "from" are just passed through */
19
+ @import url ('./old-skool.css' );
20
+
18
21
._constants_source__foo {
19
22
box-shadow : 0 0 10px # f01 ;
20
23
border-color : # 2f2 ;
Original file line number Diff line number Diff line change 1
- @let borders: "./borders.css" , breakpoints : "./breakpoints.css" ;
2
- @- import small, medium from breakpoints;
1
+ @define borders: "./borders.css" , breakpoints : "./breakpoints.css" ;
2
+ @import-define small, medium from breakpoints;
3
3
@import secondary, primary as blue from "./colors.css" ;
4
4
5
+ /* Imports without a "from" are just passed through */
6
+ @import url ('./old-skool.css' );
7
+
5
8
.foo {
6
9
composes : dashed from borders;
7
10
composes : text-secondary from "./colors.css" ;
You can’t perform that action at this time.
0 commit comments