Created
November 18, 2021 10:03
-
-
Save MikelArnaiz/a7f0eac0072baa5c7ad3f7d9bd3fbf4f to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
@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 style the paragraph with the line-height coming from the mixin getStyles? | |
p { | |
// $styles: @include getStyles; | |
// line-height: $styles['line-height']; | |
// @include getStyles['line-height']; | |
} | |
} |
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
div { | |
font-size: 8px; | |
line-height: 10px; | |
} | |
div p { | |
color: red; | |
} |
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
{ | |
"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