mastodon.design is one of the many independent Mastodon servers you can use to participate in the fediverse.
A small instance for and by people who make things! We stand for an open, independent, sustainable, inclusive, and accessible web.

Administered by:

Server stats:

315
active users

Amadeus Maximilian

: if you've been using a custom `rem()` function in to convert px to rem, version 1.65 is likely to break your code, as it introduces the official `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: github.com/sass/sass/issues/35

GitHubSupport additional calculation functions · Issue #3504 · sass/sassBy nex3

@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:

github.com/sass/dart-sass/issu
github.com/sass/dart-sass/issu

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. 🤷

GitHub@1.49.9 Skipped not serializable cache item 'Compilation/modules · Issue #2060 · sass/dart-sassBy HarshitSrivastava007