Skip to content

Instantly share code, notes, and snippets.

@MikelArnaiz
Created November 18, 2021 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MikelArnaiz/53fc437d2053f6609fdf0cd0b08ce791 to your computer and use it in GitHub Desktop.
Save MikelArnaiz/53fc437d2053f6609fdf0cd0b08ce791 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
@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'];
}
}
div {
font-size: 8px;
line-height: 10px;
}
{
"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