-
-
Save atelierbram/8496161 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
.sidebar { | |
width: 33.33%; | |
} | |
@media (max-width: 600px) { | |
.sidebar { | |
width: 100%; | |
} | |
} | |
@media (min-width: 1250px) { | |
.sidebar { | |
width: 20%; | |
} | |
} |
This file contains hidden or 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
// ---- | |
// 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