Last active
February 16, 2017 14:55
-
-
Save d13/b31489dd37e0f34b5175 to your computer and use it in GitHub Desktop.
LESS: Mixing variables into caller's scope
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
@import "vars"; | |
@import "mixins"; | |
.vanilla-sandwich { | |
.vanilla-config(); | |
.icecream-sandwich(); | |
} | |
.neopolitan-sandwich { | |
.neopolitan-config(); | |
.icecream-sandwich(); | |
} |
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
.icecream-sandwich() { | |
background-color: @vars1; | |
color: @vars2; | |
border: 1x solid @vars3; | |
} |
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
@vanilla: #fff; | |
@strawberry: #F78BB2; | |
@chocolate: #61543C; | |
.vanilla-config() { | |
@vars1: @vanilla; | |
@vars2: @vanilla; | |
@vars3: @chocolate; | |
} | |
.neopolitan-config() { | |
@vars1: @strawberry; | |
@vars2: @vanilla; | |
@vars3: @chocolate; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment