Last active
May 5, 2017 01:41
-
-
Save dippas/3bdd0bcfc11db4101c3ffacafcdf7d32 to your computer and use it in GitHub Desktop.
SASS error: Incompatible units: 'px' and 'px*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
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
@mixin font-size($base: 16 ){ | |
font-size: $base + px; //fallback for old browsers | |
font-size: (.0625 * $base) + rem; | |
} | |
$font-size-base: 14 !default; | |
$line-height-base: 1.846 !default; | |
$input-line-height: floor(($font-size-base * $line-height-base)) !default; | |
$input-padding-y: 6px !default; | |
$input-height: (($font-size-base * $input-line-height) + ($input-padding-y * 2)) !default; | |
div { | |
height:$input-height; | |
/*fonts with variable*/ | |
font-size: ($font-size-base * 1px); | |
font-size: ($font-size-base * .0625rem); | |
/*fonts with mixin*/ | |
@include font-size() | |
} |
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
div { | |
height: 362px; | |
/*fonts with variable*/ | |
font-size: 14px; | |
font-size: 0.875rem; | |
/*fonts with mixin*/ | |
font-size: 16px; | |
font-size: 1rem; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://stackoverflow.com/questions/42797624/sass-error-incompatible-units-px-and-pxpx/42797952#42797952