Created
August 11, 2015 10:17
-
-
Save vjandrei/73d114fd20acfed68c3c 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
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
$breakpoints: (mobile: 767px, tablet: 992px, desktop: 1200px); | |
@mixin respond-to($breakpoint) { | |
@if map-has-key($breakpoints, $breakpoint) { | |
@media (min-width: #{map-get($breakpoints, $breakpoint)}) { | |
@content; | |
} | |
} | |
@else { | |
@warn "Unfortunately, no value could be retrieved from `#{$breakpoint}`. " + "Please make sure it is defined in `$breakpoints` map."; | |
} | |
} | |
.element { | |
@include respond-to(mobile) { | |
content:"Mobile"; | |
} | |
@include respond-to(tablet) { | |
content:"Tablet"; | |
} | |
@include respond-to(desktop) { | |
content:"Dekstop"; | |
} | |
} |
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
@media (min-width: 767px) { | |
.element { | |
content: "Mobile"; | |
} | |
} | |
@media (min-width: 992px) { | |
.element { | |
content: "Tablet"; | |
} | |
} | |
@media (min-width: 1200px) { | |
.element { | |
content: "Dekstop"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment