Last active
December 14, 2015 23:59
-
-
Save tx2z/5169407 to your computer and use it in GitHub Desktop.
Saas @mixin for change measures in responsive desing - http://jesus.perezpaz.es/2013/03/saas-mixin-for-change-measures-for-responsive-desing/
This file contains 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
$responsive_resize: 0.6; | |
$px:1px; | |
@mixin res($rpx) { | |
$px: $rpx; | |
@content; | |
@media screen and (max-width: 320px) { | |
$px: $rpx*$responsive_resize; | |
@content; | |
} | |
} |
This file contains 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
.myclass { | |
@include res(400px) { width: $px; } | |
} |
This file contains 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
.myclass { | |
width: 400px; } | |
@media screen and (max-width: 495px) { | |
.myclass { | |
width: 240px; } } |
This file contains 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
.myclass { | |
@include res(400px) { width: $px; } | |
@include res(200px) { height: $px; } | |
} |
This file contains 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
.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