Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Fix rem-to-dip #278
Fix rem-to-dip #278
Conversation
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? Not entirely certain what the fallback case is for, it's not clear from the commit history.
Started trying to use this mixin then noticed a logic error.
The unit of
$sizewill always be(!em || !rem)because if it's one it's not the other. Changed toandbecause 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-dipalways returns the input size without units, for example:What is the new behavior?
rem-to-dipwill return$size * $font-sizeforemorremunits, and a fraction for other units. Not certainemshould be included because the result is not accurate. Not fixed:rem/emis 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