Last active
February 13, 2018 13:51
-
-
Save seven-phases-max/d7aae1f9e39c6e5f8c87dd499a56c881 to your computer and use it in GitHub Desktop.
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
// usage: | |
@default-volume-color: white; | |
.test-1 { | |
.volume-color(novel, 1); | |
color: @volume-color; | |
} | |
.test-2 { | |
.volume-color(novel, 33); | |
color: @volume-color; | |
} | |
.test-3 { | |
.volume-color(vonel, -22); | |
color: @volume-color; | |
} | |
// ........................... | |
// impl.: | |
.volume-color(@media, @volume) {@volume-color: @default-volume-color} | |
.volume-color(novel, @volume) {@volume-color: green} | |
.volume-color(novel, 1) {@volume-color: red} | |
.volume-color(novel, 0) {@volume-color: @default-volume-color} |
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
// usage: | |
@volume-color: white; | |
.test-1 { | |
.volume-color(novel, 1); | |
color: @volume-color; | |
} | |
.test-2 { | |
.volume-color(novel, 33); | |
color: @volume-color; | |
} | |
.test-3 { | |
.volume-color(something-else, -22); | |
color: @volume-color; | |
} | |
// ........................... | |
// impl.: | |
.volume-color(...) {} | |
.volume-color(novel, 1) {@volume-color: red} | |
.volume-color(novel, @volume) | |
when (@volume > 2) {@volume-color: green} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment