Skip to content

Instantly share code, notes, and snippets.

@MikelArnaiz
Last active November 18, 2021 10:02
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/27e63644a20d91346b1d890350550ab3 to your computer and use it in GitHub Desktop.
Save MikelArnaiz/27e63644a20d91346b1d890350550ab3 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 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'];
}
}
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