Skip to content

Instantly share code, notes, and snippets.

@wiesson
Created March 29, 2016 14:04
Show Gist options
  • Save wiesson/ce8bfc99995629f7b03c to your computer and use it in GitHub Desktop.
Save wiesson/ce8bfc99995629f7b03c to your computer and use it in GitHub Desktop.
scss mixin test
$size-sm: 544px;
$size-md: 768px;
$size-lg: 992px;
$size-xl: 1200px;
@mixin sm {
@media (min-width: $size-sm) {
@content;
}
}
@mixin md {
@media (min-width: $size-md) {
@content;
}
}
@mixin lg {
@media (min-width: $size-lg) {
@content;
}
}
@mixin xl {
@media (min-width: $size-xl) {
@content;
}
}
.container {
margin: 0 auto;
@include sm {
max-width: 576px;
}
@include md {
max-width: 720px;
}
@include lg {
max-width: 940px;
}
@include xl {
max-width: 1140px;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment