Started trying to use this mixin then noticed a logic error.
The unit of $size will always be (!em || !rem) because if it's one it's not the other. Changed to and because I think that's the desired functionality? It looks like the fallback case is to strip the units off of the input value, seems a little strange, might need further discussion about what's actually going on here?
[ ] There is an issue for the bug/feature this PR is for. To avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it.
rem-to-dip will return $size * $font-size for em or rem units, and a fraction for other units. Not certain em should be included because the result is not accurate. Not fixed: rem/em is not stripped from rem/em units. so the actual output is font-size: 20rem; which is interpreted as DIPs.
Thank you @jamescodesthings - I wasn't watching this repo; so I missed a lot of what was going on. I've merged your PR's. We will get a new version out that fixes all the issues.
Started trying to use this mixin then noticed a logic error.
The unit of
$size
will always be(!em || !rem)
because if it's one it's not the other. Changed toand
because I think that's the desired functionality? It looks like the fallback case is to strip the units off of the input value, seems a little strange, might need further discussion about what's actually going on here?PR Checklist
What is the current behavior?
rem-to-dip
always returns the input size without units, for example:What is the new behavior?
rem-to-dip
will return$size * $font-size
forem
orrem
units, and a fraction for other units. Not certainem
should be included because the result is not accurate. Not fixed:rem/em
is not stripped from rem/em units. so the actual output isfont-size: 20rem;
which is interpreted as DIPs.BREAKING CHANGES: N/A
Migration steps: N/A