Last active
February 13, 2017 18:18
-
-
Save greatislander/e7a61701abc5c71a341151850ad09c24 to your computer and use it in GitHub Desktop.
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
// SCSS v2 (first draft) | |
// Set variable | |
@if $type = 'epub' { | |
$body-font-size: medium !default; | |
} @elseif $type = 'prince' { | |
$body-font-size: 11pt !default; | |
} @elseif $type = 'web' { | |
$body-font-size: 14pt !default; | |
} | |
// Use variable | |
$type: 'epub'; | |
body { | |
font-size: $body-font-size; | |
} | |
// SCSS v2 (second draft) | |
// Set variable | |
$body-font-size: ( | |
epub: medium, | |
prince: 11pt, | |
web: 14pt | |
) !default; | |
// Use variable | |
$type: 'epub'; | |
body { | |
font-size: map-get($body-font-size, $type); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment