polished icon indicating copy to clipboard operation
polished copied to clipboard

Mix doesn't output the same value as vanilla SCSS

Open ivanlori opened this issue 3 years ago • 1 comments

  • polished version: 4.1.0 and 4.2.2
  • JSS-in_CSS library and version: styled-components 5.2.1
  • Any relevant JS library and version: React 16.0.0

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

ivanlori avatar Apr 11 '22 08:04 ivanlori

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.

bhough avatar Apr 14 '22 21:04 bhough