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

Add some love to breakpoints #6351

Closed
wants to merge 2 commits into from
Closed

Add some love to breakpoints #6351

wants to merge 2 commits into from

Conversation

karland
Copy link
Contributor

@karland karland commented Mar 3, 2015

  1. Add breakpoints for media queries, which are a) easier to change and can b) be used as variables elsewhere.
  2. Make them rem-compatible and more consistent with foundation. This also makes them more meaningful, i.e. rem-calc(1024) is easier than 64em

@sdhull
Copy link
Contributor

sdhull commented Mar 4, 2015

I like it, personally. It's small but definitely more readable 👍

@tyrantkhan
Copy link
Contributor

I like this change too :)

@rafibomb rafibomb added the scss label Mar 9, 2015
@rafibomb rafibomb added this to the 5.5.2 milestone Mar 9, 2015
@rafibomb
Copy link
Member

We like the idea because this is closer to what we're doing for the next version of Foundation.

Concerning the switch to rem's, has anything changed in the way these work in media queries? According to http://blog.cloudfour.com/the-ems-have-it-proportional-media-queries-ftw/ ems are safer. Also has this issue really been resolved in webkit? https://bugs.webkit.org/show_bug.cgi?id=78295

Doesn't appear to be...

@karland
Copy link
Contributor Author

karland commented Mar 27, 2015

Good point. I did not have any problems with rem's in media-queries, but now I double check. However, the idea is not really dependent on rem's. If foundation still offered em-calc, which was deprecated, I would have probably taken em-calc. My idea was not so much about rems or ems but to have a more intuitiv approach to setting breakpoints.

If you want to "rescue" the idea I see two solutions to the problem:

  • re-vive the deprecated em-calc only in this context until the bug is fixed
  • write a special purpose function, e.g. bp-calc that translates px in ems (which is just reusing the old em-calc under a different name)

If you do not want to do anything either, I am happy to close the issue.

@rafibomb
Copy link
Member

I discussed it with the team. It's a step in the right direction. Let's get this changed to EM's and we'll merge it in.

@rafibomb rafibomb assigned rafibomb and unassigned zurbrandon Mar 30, 2015
@karland
Copy link
Contributor Author

karland commented Mar 30, 2015

Fine. So, I am going to issue a new PR. I am going to write a new function bp-em-calc to make clear that it is for breakpoints only and to not re-introduce a deprecated function. When the rem-bug in media-queries is fixed, this function can then also be deprecated. Would you be happy with this?

@karland
Copy link
Contributor Author

karland commented Apr 4, 2015

New PR #6439

@karland karland closed this Apr 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants