Last active
November 12, 2016 20:18
-
-
Save nckcol/748b8ea8ae4bcfe0a6b3f0978d717ec7 to your computer and use it in GitHub Desktop.
SCSS function for css lock https://fvsch.com/code/css-locks/
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
@function lock($min_value /* em */, $max_value /* em */, $min_width /* em */, $max_width /* em */) { | |
@return calc( | |
#{$min_value} | |
+ (#{$max_value/1em} - #{$min_value/1em}) | |
* (100vw - #{$min_width}) | |
/ (#{$max_width/1em} - #{$min_width/1em}) | |
); | |
} | |
// CodePen Sample http://codepen.io/nckcol/pen/aBNJXP | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment