Last active
April 20, 2018 09:23
-
-
Save hiulit/2bc54f2d839b68982b0467264652eeca to your computer and use it in GitHub Desktop.
Stylus variables usage with string interpolation (e.g. when using the calc() function)
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
$some-variable = 10px | |
body | |
width: "calc(100% - %s)" % $some-variable | |
// To use multiple variables wrap the values into round brackets. | |
$some-variable = 10px | |
$another-variable = 5px | |
body | |
width: "calc(100% - %s - %s)" % ($some-variable $another-variable) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment