Created
February 15, 2016 13:41
-
-
Save tzi/263abd5eeb16141bc4b1 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
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
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
@mixin responsive-calc($columns: 2, $under: 480px) { | |
$pre-computed-calc: #{($under * ($under / 1px))} - #{(100% * ($under / 1px))}; | |
display: inline-block; | |
min-width: ($under / 2); | |
width: (100% / $columns); | |
max-width: 100%; | |
min-width: -webkit-calc(100% / #{$columns}); | |
min-width: calc(100% / #{$columns}); | |
width: -webkit-calc(#{$pre-computed-calc}); | |
width: calc(#{$pre-computed-calc}); | |
} | |
.foo { | |
@include responsive-calc($columns: 3, $under: 600px); | |
} |
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
.foo { | |
display: inline-block; | |
min-width: 300px; | |
width: 33.33333333%; | |
max-width: 100%; | |
min-width: -webkit-calc(100% / 3); | |
min-width: calc(100% / 3); | |
width: -webkit-calc(360000px - 60000%); | |
width: calc(360000px - 60000%); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment