Last active
April 19, 2017 04:05
-
-
Save intermundos/85d71a1f84979ef03c23da1db97fa884 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
| $mq-324: 324px; | |
| $mq-768: 768px; | |
| $mq-1024: 1024px; | |
| $mq-1200: 1200px; | |
| $mq-1600: 1600px; | |
| @function between($to, $from, $toWidth, $fromWidth) { | |
| $slope: ($to - $from) / ($toWidth - $fromWidth); | |
| $base: $from - $slope * $fromWidth; | |
| @return calc(#{$base} + #{100vw * $slope}); | |
| } | |
| @mixin between($property, $from, $to, $fromWidth, $toWidth) { | |
| #{$property}: $to; | |
| @media screen and (min-width: $toWidth){ | |
| #{$property}: between($to, $from, $toWidth, $fromWidth); | |
| } | |
| @media screen and (min-width: $fromWidth) { | |
| #{$property}: $from; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment