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

What about supporting browsers without support of flexbox? #2

Open
f opened this issue Apr 15, 2016 · 7 comments
Open

What about supporting browsers without support of flexbox? #2

f opened this issue Apr 15, 2016 · 7 comments
Assignees
Milestone

Comments

@f
Copy link
Collaborator

f commented Apr 15, 2016

Should we support browsers with no support of flexbox? Seems IE 9 and 8 does not have support for flexbox. Maybe we can fallback to table view with columns:

<table>
  <tr>
    <td class="bricklayer-column">items..</td>
    <td class="bricklayer-column">items..</td>
  </tr>
</table>

@ademilter If you think supporting this is not required and will be overkill for its simplicity, we can just do not support.

PS. Calculating height of table columns may have problems and we can have problems with responsiveness.

@f f added this to the v0.5.0 milestone Apr 15, 2016
@nicooprat
Copy link

I think you could also remove use of display: flexbox completely (which seems to be useful only to align items horizontally in this case):

.bricklayer {
  display: table;
  width: 100%;
  table-layout: fixed;
  margin: 0;
}

.bricklayer-column {
  display: table-cell;
  vertical-align: top;
}

@f
Copy link
Collaborator Author

f commented Apr 15, 2016

@nicooprat You're right. We are working on supporting older browsers via fallbacks. At first we planned to make it work with modern browsers.

My question is (I did not try) if I can calculate heights of column cells. I guess table cells have same heights in one row which breaks the main logic of bricklayer.

@nicooprat
Copy link

Right, didn't think of that. All columns have the same height, but it may exist a way to get their "natural" height (without calculating the sum of all of their children heights):

capture d ecran 2016-04-15 a 13 06 45

Here's what the Chrome console indicates. Height is 680px but it looks like there's an intrinsic padding-bottom added. Couldn't find a way to calculate its value however...

@f
Copy link
Collaborator Author

f commented Apr 15, 2016

This strange padding is because of table-layout: fixed I guess.

Calculating sum of children heights is the first idea I had, but sounds "heavy" when you think of loads of items in a column. We already want a very simple implementation.

If you find a way to get natural height with minimal calculation please let us know or PR would be more awesome :)

@nicooprat
Copy link

Seems not possible with table cells. But a workaround to get a column "natural" height without too much computation could be to compare the column getBoundingClientRect().top and its last child getBoundingClientRect().bottom?

@zippex
Copy link

zippex commented Apr 28, 2016

Just a short note: please don't forget the new Edge Browser on Windows 10 and Windows 10 Mobile. At the moment Bricklayer does not work on Edge.

@meritel
Copy link

meritel commented Sep 28, 2016

@zippex is right, support on Windows 10 would be nice.
Seems to be the same problem than on ie > ":scope"

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

No branches or pull requests

5 participants