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

Fix 1px rounding issue for flexbox grids in Safari #260 #262

Merged

Conversation

hudochenkov
Copy link
Contributor

Remove unneeded float: right for flexbox grids and replaced with margin-left: auto. Fixes #260 and #200.

Also remove on rule duplicating.

Codepen with compiled code.

@hudochenkov hudochenkov changed the title Remove float: right for flexbox grids #260 Fix 1px rounding issue for flexbox grids in Safari #260 Feb 17, 2016
@corysimmons
Copy link
Contributor

Don't merge.

Be careful with margin: auto in flexbox. It's pretty powerful.

image

@hudochenkov
Copy link
Contributor Author

@corysimmons can you show me the example from the screenshot?

@hudochenkov
Copy link
Contributor Author

@corysimmons I've fixed the problem and updated the codepen.

But let's face it, example is very unpredictable #200 (comment)

If we compile SCSS and clean from unused selectors it will look like:

.grid-lost-2 section {
  lost-center: 1170px;
}
.grid-lost-2 div {
  lost-column: 1/4;
}
@media all and (min-width: 400px) {
  .grid-lost-2 div {
    lost-column: 1/6;
  }
}
@media all and (min-width: 900px) {
  .grid-lost-2 div {
    lost-column: 1/12;
  }
}
.grid-lost-2 > section > div {
  lost-column: 1/4;
}
.grid-lost-2 > section > div:last-child {
  lost-column: 1/2 3;
}
.grid-lost-2 > section > div > section > div {
  lost-column: 1/4;
}

@corysimmons
Copy link
Contributor

I don't have much of an opinion on it tbh. I just didn't want that flexbox margin auto breaking stuff. 👻

@hudochenkov
Copy link
Contributor Author

Ping.

@peterramsing
Copy link
Owner

@hudochenkov I'm here! I promise. Life got crazy.

@peterramsing peterramsing merged commit b622d40 into peterramsing:master May 15, 2016
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

Successfully merging this pull request may close these issues.

3 participants