Created
November 18, 2021 09:59
-
-
Save MikelArnaiz/53fc437d2053f6609fdf0cd0b08ce791 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
@mixin byPlatform($type) { | |
@if $type == 'mobile' { | |
font-size: 8px; | |
line-height: 10px; | |
} | |
@if $type == 'table' { | |
font-size: 12x; | |
line-height: 15px; | |
} | |
@if $type == 'desktop' { | |
font-size: 16px; | |
line-height: 20px; | |
} | |
} | |
@mixin getStyles() { | |
@include byPlatform('mobile'); | |
// @media (min-width: 768px) { | |
// @include byPlatform('tablet'); | |
// } | |
// @media (min-width: 1280px) { | |
// @include byPlatform('desktop'); | |
// } | |
} | |
div { | |
@include getStyles; | |
// How to access getStyles mixin's line-height property? | |
p { | |
// $styles: @include getStyles; | |
// line-height: $styles['line-height']; | |
// @include getStyles['line-height']; | |
} | |
} |
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
div { | |
font-size: 8px; | |
line-height: 10px; | |
} |
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
{ | |
"sass": { | |
"compiler": "dart-sass/1.32.12", | |
"extensions": {}, | |
"syntax": "SCSS", | |
"outputStyle": "expanded" | |
}, | |
"autoprefixer": false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment