-
Notifications
You must be signed in to change notification settings - Fork 5
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
Hack Firefox? #8
Comments
See this commit. I was able achieve a CSS-only workaround but it does require making the body, and basically everything down to the element in question |
I made a codepen to demonstrate this cross browser ScreenshotIn the top left we have Safari, which is the only browser shown that lays the elements out correctly. Notice the yellow footer is always visible and the green content area scrolls accordingly. |
Also see philipwalton/flexbugs#42 |
Firefox still has some flexbox issues, particularly when dealing with
flex-direction:column
. We are noticing that Firefox will allow children to be as tall as they want, rather than as tall as the flexbox spec tells them they should be. To work around this, I've had to 'hack firefox' to essentially not use the holy grail layout OR manually patch the flexbox bug usingJavaScript
and a nasty resize listener.Somebody please tell us we are mistaken and just missing a Firefox prefix or something 🙏
Example
See this page in Firefox 37.0.2 to see how we are working around the flexbox bug by de-activating the holy grail layout.
See this page in Firefox 37.0.2 to see how we are working around the flexbox bug by using
JavaScript
rather than the above CSS hack.Sass Hack
JavaScript Hack
Chrome 👍
No hacks needed. Correctly laid out.
Firefox 37.0.2 👎
SCSS Hack being used to deactivate holygrail layout.
Firefox 37.0.2 👎
JS Hack being used to manually calculate holygrail layout. This is super lame because the whole point of flexbox is not to have to do things like this 😢
Flexbox Bug
The issue is rather simple. We have
![](https://camo.githubusercontent.com/5577ad6fd75cc27e2d766ebc906c039e2ff05e7fceb9c50304a11563ba6e54fc/687474703a2f2f6a34702e75732f696d6167652f3364314233683337306231522f53637265656e25323053686f74253230323031352d30342d32352532306174253230382e34312e3231253230414d2e706e67)
div.stage
:with this CSS:
So it is nice and tall and will lay it's children,
div.eureka__topbar
anddiv.eureka-table
out vertically. We want.eureka__topbar
to take up as much room as it needs to but not grow anymore than is necessary, and then we want.eureka-table
to simply take up the remaining space.We have
![](https://camo.githubusercontent.com/b374c22af55de5e24d105ae4e6fbe7b4fdfa42a1deebc28190b2108886bb3741/687474703a2f2f6a34702e75732f696d6167652f31593176304e31393375304c2f53637265656e25323053686f74253230323031352d30342d32352532306174253230382e34352e3433253230414d2e706e67)
div.eureka__topbar
:with this
CSS
:Lastly, we have
![](https://camo.githubusercontent.com/846b2c8e9d04f224711b4f4f005d3c45ca5bcddb096cb417dae87b54406c800b/687474703a2f2f6a34702e75732f696d6167652f30553376343632583353304f2f53637265656e25323053686f74253230323031352d30342d32352532306174253230382e33372e3337253230414d2e706e67)
div.eureka-table
:with this
CSS
:so it will take up the remaining space.
The text was updated successfully, but these errors were encountered: