Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from css-modules/feature/constants
Values!
- Loading branch information
Showing
11 changed files
with
115 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"a": "_multiple_dependencies_source__a _multiple_dependencies_b__b1 _multiple_dependencies_d__d1 _multiple_dependencies_d__d2 _multiple_dependencies_b__b2 _multiple_dependencies_c__c" | ||
"a": "_multiple_dependencies_source__a _multiple_dependencies_b__b1 _multiple_dependencies_d__d1 _multiple_dependencies_d__d2 _multiple_dependencies_b__b2 _multiple_dependencies_c__c something-global" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
.a { | ||
composes: b1 b2 from "./b.css"; | ||
composes: c from "./c.css"; | ||
composes: something-global from global; | ||
color: #aaa; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.dashed { | ||
border: 4px dashed; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@value small (max-width: 599px); | ||
@value medium (min-width: 600px) and (max-width: 959px); | ||
@value large (min-width: 960px); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@value primary: #f01; | ||
@value secondary: #2f2; | ||
|
||
.text-primary { | ||
color: primary; | ||
} | ||
.bg-primary { | ||
background-color: primary; | ||
} | ||
|
||
.text-secondary { | ||
color: secondary; | ||
} | ||
.bg-secondary { | ||
background-color: secondary; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
._values_borders__dashed { | ||
border: 4px dashed; | ||
} | ||
|
||
._values_colors__text-primary { | ||
color: #f01; | ||
} | ||
._values_colors__bg-primary { | ||
background-color: #f01; | ||
} | ||
|
||
._values_colors__text-secondary { | ||
color: #2f2; | ||
} | ||
._values_colors__bg-secondary { | ||
background-color: #2f2; | ||
} | ||
/* Imports without a "from" are just passed through */ | ||
@import url('./old-skool.css'); | ||
|
||
._values_source__foo { | ||
box-shadow: 0 0 10px #f01; | ||
border-color: #2f2; | ||
} | ||
|
||
@media (max-width: 599px) { | ||
._values_source__foo { | ||
background: white; | ||
} | ||
} | ||
@media (min-width: 600px) and (max-width: 959px) { | ||
._values_source__foo { | ||
background: peru; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"borders": "\"./borders.css\"", | ||
"breakpoints": "\"./breakpoints.css\"", | ||
"small": "(max-width: 599px)", | ||
"medium": "(min-width: 600px) and (max-width: 959px)", | ||
"secondary": "#2f2", | ||
"blue": "#f01", | ||
"foo": "_values_source__foo _values_borders__dashed _values_colors__text-secondary" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
@value borders: "./borders.css", breakpoints: "./breakpoints.css"; | ||
@value small, medium from breakpoints; | ||
@value secondary, primary as blue from "./colors.css"; | ||
|
||
/* Imports without a "from" are just passed through */ | ||
@import url('./old-skool.css'); | ||
|
||
.foo { | ||
composes: dashed from borders; | ||
composes: text-secondary from "./colors.css"; | ||
box-shadow: 0 0 10px blue; | ||
border-color: secondary; | ||
} | ||
|
||
@media small { | ||
.foo { | ||
background: white; | ||
} | ||
} | ||
@media medium { | ||
.foo { | ||
background: peru; | ||
} | ||
} |