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

Why not just use CSS? #3

Closed
JawsomeJason opened this issue Feb 26, 2014 · 3 comments
Closed

Why not just use CSS? #3

JawsomeJason opened this issue Feb 26, 2014 · 3 comments
Labels

Comments

@JawsomeJason
Copy link

JavaScript/DOM is an extreme performance hit when looping or adding elements--redraw nightmare.

From: http://codepen.io/oklsfo/pen/JDnFG

.container {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
}
@brunjo
Copy link
Owner

brunjo commented Feb 27, 2014

If you want to support Internet Explorer 9 you must use JavaScript because of the browser support of flexbox: http://caniuse.com/#search=flexbox
And I think the very variable margin in the CSS solution makes the layout look sloppy. With rowGrid.js you can set a minimal and a maximal margin. So you have more control.

@JawsomeJason
Copy link
Author

Fair reason. You might want to advertise the possibility of flexbox--and its caveats.  Just a suggestion, but I respect your approach.

On Thu, Feb 27, 2014 at 1:13 AM, brunjo notifications@github.com wrote:

If you want to support Internet Explorer 9 you must use JavaScript because of the browser support of flexbox: http://caniuse.com/#search=flexbox

And I think the very variable margin in the CSS solution makes the layout look sloppy. With rowGrid.js you can set a minimal and a maximal margin. So you have more control.

Reply to this email directly or view it on GitHub:
#3 (comment)

@brunjo brunjo closed this as completed Feb 27, 2014
@oklsfo
Copy link

oklsfo commented Feb 27, 2014

minimal margin fix:

.container {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  margin: 0 -5px;
}

.children > * {
  margin: 0 5px;
}

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

No branches or pull requests

3 participants