Skip to content

Instantly share code, notes, and snippets.

@ilicmarko
Created April 15, 2015 13:48
Show Gist options
  • Save ilicmarko/73121fc216186f58b8af to your computer and use it in GitHub Desktop.
Save ilicmarko/73121fc216186f58b8af to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
// Map with much breakpoints
$breakpoints: (
small: 320px,
medium: 600px,
large: 768px
);
// Respond-To Mixin
@mixin resize($breakp){
@if map-has-key($breakpoints,$breakp){
$value: map-get($breakpoints,$breakp);
@media screen and (min-width: $value){
@content
}
}
@warn "Unknown `#{$breakp}` in $breakpoints";
}
// Sass
.m-tabs {
background-color: #f2f2f2;
color: #FFF;
@include resize(small) {
background-color: #666;
}
}
.m-tabs {
background-color: #f2f2f2;
color: #FFF;
}
@media screen and (min-width: 320px) {
.m-tabs {
background-color: #666;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment