Last active
August 29, 2015 14:22
-
-
Save lozandier/0ed8336668289c1d0a9c to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or 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
| // ---- | |
| // libsass (v3.2.4) | |
| // ---- | |
| // Map from Imported JSON | |
| $map: ( primaryColor: "red", secondaryColor: "blue" ); | |
| :root { | |
| --x-foo-primary-color: map-get($map, 'primaryColor'); | |
| // Not the outcome you expect because of existing shorthand allowed by Sass for long property names based on one prefix | |
| --common-properties: { | |
| color: map-get($map, 'primaryColor'); | |
| background: map-get($map, 'secondaryColor') | |
| } | |
| } | |
| x-foo { | |
| color: var(--x-foo-primary-color); | |
| // Apply crashes the compiler | |
| //@apply(--common-properties) | |
| } |
This file contains hidden or 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
| :root { | |
| --x-foo-primary-color: "red"; | |
| --common-properties-color: "red"; | |
| --common-properties-background: "blue"; | |
| } | |
| x-foo { | |
| color: var(--x-foo-primary-color); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment