Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rem function removal without mention or recommended replacement #986

Closed
attilagyorffy opened this issue Dec 20, 2016 · 5 comments
Closed

Comments

@attilagyorffy
Copy link

The rem function was removed from bourbon without any mention in the CHANGELOG. I wonder what is the reason behind it (unless it was an accident I'm sure there is a valid reason) and so I'd like to learn about it.

Expected behaviour

The rem function to exist or have an alternative

Actual behavior

The function was removed in 9445e34 without any recommendation of a replacement or reasons in the CHANGELOG

Bourbon version

5.0.0-beta.7

Environment info

Using the npm package vi github at https://github.com/thoughtbot/bourbon#1fda560885797aa224932e278e3a077092451f85

Screenshots (if relevant)

proof-of-removal

@tysongach
Copy link
Contributor

@attilagyorffy Hello! Both the rem and em functions were indeed removed in v5 (currently in beta). Couple notes on that:

  1. This removal is mentioned in the changelog: https://github.com/thoughtbot/bourbon/blob/master/CHANGELOG.md#removed-2 (towards the bottom)
  2. Here is the discussion around why they were removed: Deprecate em() and rem() functions #691
  3. There is no “replacement”, per se; rather, we encourage using rem units directly.
  4. If we added a note to the changelog linking to the discussion about the removal, would it be helpful?
  5. Finally, before 5.0 gets released as a stable version, we intend to release a 4.3 which would introduce deprecation warnings for everything removed in v5.

@attilagyorffy
Copy link
Author

Hi @tysongach. I'm sorry I totally missed the entries on the bottom. (Small note, I have been searching for rem function as opposed to a mixin, which rem actually used to be).

Initially I was in favour of the rem function, having seen the discussion now I believe there's a reasonable argument for using rems directly. I'd totally suggest linking in the CHANGELOG so that other people could also benefit from reading it.

Thank you.

@tysongach
Copy link
Contributor

tysongach commented Dec 20, 2016

Small note, I have been searching for rem function as opposed to a mixin…

Whoops! That’s a typo. I just fixed that in 02e8b7f.

I'd totally suggest linking in the CHANGELOG so that other people could also benefit from reading it.

Awesome. I’ve added these details to the changlog in 6afd8f1.

Thanks!

@benfurfie
Copy link

benfurfie commented Apr 19, 2017

As has been raised in the referenced discussion, the removal completely ignores the reality that many front end developers translate designs from programs that are based on pixel values. While yes, in an ideal world, we'd all code directly in rem, I have much more pressing things to do than learn the 16 times table in my head or sit pumping values into a calculator all day.

All this has resulted in is me having to manually add the rem() function back in to my own code. I wouldn't be surprised if I'm not the only one.

@Kiina
Copy link

Kiina commented Jun 25, 2021

I know this is an older issue, but shouldn't there be an error when you build stuff with the removed rem function?

When you update bourbon and build the project it just treats rem as css and includes it like that. Which ofc isn't going to work. I have some older projects with a build pipeline and greenkeeper and the pipeline succeeds even though it should fail since the sass build would be broken with a newer bourbon. If someone were to skip the release where the deprecation notice is included they would probably have to spend a lot of time to figure out which functions got removed in order to update instead of the sass compiler just erroring out and telling you which functions aren't supported anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants