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 wrong width in Firefox #14

Merged
merged 1 commit into from Jul 19, 2017

Conversation

Projects
None yet
3 participants
@benoittgt
Contributor

benoittgt commented Jul 19, 2017

As mention in a lobster's comment : https://lobste.rs/s/ehc9li/how_i_reduced_my_db_server_load_by_80#c_3tknvn

Articles are not properly displayed on Firefox. Article's width go outside the screen:
capture d ecran 2017-07-19 a 09 28 06

I'm very bad at CSS but it seems this change fix the issue:

capture d ecran 2017-07-19 a 09 27 43

Thanks for all the very good blogposts.

@schneems

This comment has been minimized.

Show comment
Hide comment
@schneems

schneems Jul 19, 2017

Owner

Awesome! Thanks!

Owner

schneems commented Jul 19, 2017

Awesome! Thanks!

@schneems schneems merged commit 3057c64 into schneems:master Jul 19, 2017

@schneems

This comment has been minimized.

Show comment
Hide comment
@schneems

schneems Jul 19, 2017

Owner

Curious, do you know why this fix was required? I have some other flexbox stuff, like the email signup box at the bottom, is that broken too?

Owner

schneems commented Jul 19, 2017

Curious, do you know why this fix was required? I have some other flexbox stuff, like the email signup box at the bottom, is that broken too?

@schneems

This comment has been minimized.

Show comment
Hide comment
@schneems

schneems Jul 19, 2017

Owner

Also that logo looks too big in firefox, guess i need to go download some new browsers.

Owner

schneems commented Jul 19, 2017

Also that logo looks too big in firefox, guess i need to go download some new browsers.

@benoittgt benoittgt deleted the benoittgt:Fix_wrong_width_for_firefox branch Jul 19, 2017

@benoittgt

This comment has been minimized.

Show comment
Hide comment
@benoittgt

benoittgt Jul 19, 2017

Contributor

It seems you find a way to fix the big logo on firefox (f5f6cb6). I don't have a specific answer for flex param that behaves differently between Firefox and Chrome. I will ask tomorrow to my coworkers about this. 😉

Contributor

benoittgt commented Jul 19, 2017

It seems you find a way to fix the big logo on firefox (f5f6cb6). I don't have a specific answer for flex param that behaves differently between Firefox and Chrome. I will ask tomorrow to my coworkers about this. 😉

@Freddy03h

This comment has been minimized.

Show comment
Hide comment
@Freddy03h

Freddy03h Jul 19, 2017

Set flex-basis to auto has an impact because the width is set to 75% (a magical number that doesn't solve the issue for all the viewport widths : try 780 to 1000px and there is still a scroll bar for the X axis)

To prevent the content to dictate the width of div.content there are two solutions : min-width: 0% or overflow-x: hidden

Before, we used to do flex-grow: 0% to shrink the content but it was a bug and Firefox always does the right things according to specs : https://github.com/philipwalton/flexbugs#1-minimum-content-sizing-of-flex-items-not-honored

Freddy03h commented Jul 19, 2017

Set flex-basis to auto has an impact because the width is set to 75% (a magical number that doesn't solve the issue for all the viewport widths : try 780 to 1000px and there is still a scroll bar for the X axis)

To prevent the content to dictate the width of div.content there are two solutions : min-width: 0% or overflow-x: hidden

Before, we used to do flex-grow: 0% to shrink the content but it was a bug and Firefox always does the right things according to specs : https://github.com/philipwalton/flexbugs#1-minimum-content-sizing-of-flex-items-not-honored

@Freddy03h

This comment has been minimized.

Show comment
Hide comment
@Freddy03h

Freddy03h Jul 19, 2017

And by the way, no need to set flex: 1 on div.sidebar with min-width: 14rem; max-width: 14rem. Delete the flex and use width.
And so you can use a value to 1 instead of 2 for the flex-grow of div.content.

Freddy03h commented Jul 19, 2017

And by the way, no need to set flex: 1 on div.sidebar with min-width: 14rem; max-width: 14rem. Delete the flex and use width.
And so you can use a value to 1 instead of 2 for the flex-grow of div.content.

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