#PSA: if you've been using a custom `rem()` function in #SASS to convert px to rem, version 1.65 is likely to break your code, as it introduces the official #CSS `rem()` function, which returns the remainder of a division.
There are issues open about this, but it seems intended behaviour and the official solution seems to be to rename the custom function to something like `toRem`, which yes, is sadly more annoying to type...
My solution for now: a quick project-wide search and replace `rem(` -> `toRem(` and a new snippet for SASS that turns `rem` into `toRem($1)$0`, because muscle memory is hard to get rid of. And hey, this way I at least don't have to type the parentheses.
*Update*: the change was reverted. Version 1.66 now no longer breaks custom `rem()` functions—for now. Custom function names overlapping with CSS math functions have been deprecated and will stop working eventually.
For context see this comment on GitHub: https://github.com/sass/sass/issues/3504#issuecomment-1682737824
@amxmln do you have any further details? Pretty sure I've got a rem() function in all my code - might not have to update tho.
@scrwd I can only point you to these two issues on GitHub:
https://github.com/sass/dart-sass/issues/2060
https://github.com/sass/dart-sass/issues/2059#issuecomment-1673498459
It looks like it's intended behaviour, so yeah, either you don't update your SASS dependency locking it to a version pre 1.65, or you rename your custom function.
Feels kind of mad to me that they released this as a minor update when custom `rem()` functions are so prevalent, but that's how it is.