Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Media Query Mixin
/* Be sure to set these in your variables partial for this mixin to work
* $mobile_width
* $tablet_width
* $desktop_width
* $wpadmin_width
*/
@mixin media( $res ) {
@if mobile == $res {
@media only screen and (min-width: $mobile_width) {
@content;
}
}
@if tablet == $res {
@media only screen and (min-width: $tablet_width) {
@content;
}
}
@if desktop == $res {
@media only screen and (min-width: $desktop_width) {
@content;
}
}
@if wp-admin == $res {
@media only screen and (min-width: $wpadmin_width) {
@content;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.