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/*
1111export default css => {
1212 /* Find any local let rules and store them*/
1313 let translations = { }
14- css . eachAtRule ( / ^ - ? l e t $ / , atRule => {
14+ css . eachAtRule ( / ^ d e f i n e $ / , atRule => {
1515 let matches
1616 while ( matches = matchLet . exec ( atRule . params ) ) {
1717 let [ /*match*/ , key , value ] = matches
@@ -31,7 +31,7 @@ export default css => {
3131
3232 /* Find imports and insert ICSS tmp vars */
3333 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 => {
3535 let matches = matchImports . exec ( atRule . params )
3636 if ( matches ) {
3737 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;
33
44.text-primary {
55 color : primary;
Original file line number Diff line number Diff line change 1515 background-color : # 2f2 ;
1616}
1717
18+ /* Imports without a "from" are just passed through */
19+ @import url ('./old-skool.css' );
20+
1821._constants_source__foo {
1922 box-shadow : 0 0 10px # f01 ;
2023 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;
33@import secondary, primary as blue from "./colors.css" ;
44
5+ /* Imports without a "from" are just passed through */
6+ @import url ('./old-skool.css' );
7+
58.foo {
69 composes : dashed from borders;
710 composes : text-secondary from "./colors.css" ;
You can’t perform that action at this time.
0 commit comments