styled-components / polished

A lightweight toolset for writing styles in JavaScript ✨
https://polished.js.org/
MIT License
7.6k stars 209 forks source link

Mix doesn't output the same value as vanilla SCSS #613

Open ivanlori opened 2 years ago

ivanlori commented 2 years ago

Mixin/Helper/Shorthand Usage

mix(0.80, '#000000', '#A4A8B1')

What You Are Seeing

Output exa value: #202123

What You Expected To See

With vanilla SCSS

mix(#000000, #A4A8B1, 80%);

The output exa value is: #212223

bhough commented 2 years ago

Verified this is the case. However, this difference holds true all the way back to polished v1.0. We need to do some more investigation into where the formula is different (this was originally copied directly from SaaS). We also need to see if it is always off, or just for certain cases. Since it has been this way from the beginning, it would be a breaking change. Will keep this issue updated.