Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save atelierbram/8496161 to your computer and use it in GitHub Desktop.
Save atelierbram/8496161 to your computer and use it in GitHub Desktop.
.sidebar {
width: 33.33%;
}
@media (max-width: 600px) {
.sidebar {
width: 100%;
}
}
@media (min-width: 1250px) {
.sidebar {
width: 20%;
}
}
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
// http://css-tricks.com/conditional-media-query-mixins/
// http://paranoida.github.io/sass-mediaqueries/
// https://raw.github.com/paranoida/sass-mediaqueries/master/_media-queries.scss
@mixin bp($point) {
@if $point == large-bp {
@media (min-width: 1600px) { @content; }
}
@else if $point == medium-bp {
@media (min-width: 1250px) { @content; }
}
@else if $point == small-bp {
@media (max-width: 600px) { @content; }
}
}
// example of usage
.sidebar {
width: 33.33%;
@include bp(small-bp) {
width: 100%;
}
@include bp(medium-bp) {
width: 20%;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment