Skip to content

Instantly share code, notes, and snippets.

@cimmanon
Created October 28, 2015 16:21
Show Gist options
  • Save cimmanon/211d4915197c57a5fc45 to your computer and use it in GitHub Desktop.
Save cimmanon/211d4915197c57a5fc45 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.14)
// Compass (v1.0.3)
// ----
@function remCon($pixel) {
@return ($pixel / 16) + rem;
}
@mixin bp($point, $media: screen) {
@if $point == small {
@media #{$media} and (max-width: remCon(600)) { @content; }
}
@else if $point == medium {
@media #{$media} and (min-width: remCon(601)) { @content; }
}
@else if $point == large {
@media #{$media} and (min-width: remCon(1024)) { @content; }
}
@else {
@media #{$media} and (min-width: remCon(#{$point})) { @content; }
}
}
.foo {
@include bp(medium) {
color: red;
}
}
@media screen and (min-width: 37.5625rem) {
.foo {
color: red;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment