Deprecation warnings on usage of rgba() with alpha percentage

125 views
Skip to first unread message

David Nahodil

unread,
Apr 20, 2016, 12:28:46 AM4/20/16
to Sass
We've started getting deprecation warnings in our Rails app instructing us to update our usages of the rgba() function in Sass.

DEPRECATION WARNING: Passing a percentage as the alpha value to rgba() will be

interpreted differently in future versions of Sass. For now, use 40 instead.


I wanted to clarify the correct change to make. The above message is generated in an instance when the alpha value in a call to rgba() is 40%. I would have thought that the correct change would be to change that to 0.4 rather than to 40?
There is an automated test for this (see https://github.com/sass/sass/commit/85b3be944581eb80df87f9c4c949b927e08c9419#diff-fff0c1d03b68f24be95fa27a7a0c0b86R294) but it's possible that was a mistake?

Thanks in advance,
David
Reply all
Reply to author
Forward
0 new messages