Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@tx2z
Last active December 14, 2015 23:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tx2z/5169407 to your computer and use it in GitHub Desktop.
Save tx2z/5169407 to your computer and use it in GitHub Desktop.
$responsive_resize: 0.6;
$px:1px;
@mixin res($rpx) {
$px: $rpx;
@content;
@media screen and (max-width: 320px) {
$px: $rpx*$responsive_resize;
@content;
}
}
.myclass {
@include res(400px) { width: $px; }
}
.myclass {
width: 400px; }
@media screen and (max-width: 495px) {
.myclass {
width: 240px; } }
.myclass {
@include res(400px) { width: $px; }
@include res(200px) { height: $px; }
}
.myclass {
width: 400px;
height: 200px; }
@media screen and (max-width: 495px) {
.myclass {
width: 240px; } }
@media screen and (max-width: 495px) {
.myclass {
height: 120px; } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment