Closed Bug 1100085 Opened 10 years ago Closed 9 years ago

Page Width on Facebook blog broken (due to new "min-width:auto" behavior on flex items, & huge image included in blog post)

Categories

(Web Compatibility :: Site Reports, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sawrubh, Assigned: mellis)

References

()

Details

(Whiteboard: [country-all] [css] [sitewait] [fb:escalated][suggested fix in comment 5])

Attachments

(2 files)

STR:
* Open https://code.facebook.com/posts/360346274145943/introducing-data-center-fabric-the-next-generation-facebook-data-center-network/ in Nightly.

What happens:
The page is much wider than the screen. This is on the latest Nightly on Linux. Works fine in Chrome and stable Firefox. Not tests on other platforms. Most probably a regression.
Seems like it's been broken for quite some time (I had assumed that it couldn't have been broken for so long and given up hope on mozregression :P ). Here's the regression range:

Last good revision: 5b64c42742cd
First bad revision: db1ceb8f8d92
Pushlog:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=5b64c42742cd&tochange=db1ceb8f8d92
dholbert's changes seem most likely.
Flags: needinfo?(dholbert)
Likely a version of bug 1043520. I'll take a closer look later today or tomorrow morning.
(which would mean it's not quite a "regression", but rather an expected result of implementing a not-quite-backwards-compatible spec change.)
Yup, this is a version of bug 1043520 --- it's a flex item expanding to accommodate the min-content size of a child, which is what the spec requires. (Though we're the only browser to implement this behavior, so far.)

tl;dr: The element <div class="_4cl6 _3f44"> needs to have "min-width:0", or "max-width:100%". (Either will work.)

MORE DETAILS:
 - The element <div class="_4cl6 _3f44"> is a flex item (its parent is display:flex), and it has the default "min-width" value (which is now "min-width:auto", introduced in the flexbox spec).  This means it will refuse to be smaller than its min-content width. (which is the min-content width of its widest child.)

 - That flex item has the following extremely wide child (intrinsic width is 1756px): <img src="https://fbcdn-dragon-a.akamaihd.net/hphotos-ak-xpa1/t39.2365-6/10541018_720080368083256_1810543636_n.jpg">.

 - So, the flex item's min-width ends up being that img's intrinsic width, which is 1756px, which is way wider than the page designers intended. (The flex container itself has "max-width:1024px", so the flex item & its children end up overflowing quite a bit.)

(You can tell that this <img> is the thing that's responsible for the huge min-content width, because the problem goes away if you set that <img> to "display: none" in devtools.)

Anyway, the correct solution here is to give the flex item "min-width:0", or perhaps "max-width:100%". We need to reach out to someone at Facebook to take a look at this.
Flags: needinfo?(dholbert)
Component: Layout → Desktop
Product: Core → Tech Evangelism
Version: unspecified → Trunk
Do we have contacts for this sort of thing at Facebook?
Flags: needinfo?(kdubost)
Yes. Not directly that should be certainly something we need to develop like we did with other big accounts. For Facebook, we currently go through Harald.
Flags: needinfo?(kdubost) → needinfo?(hkirschner)
Whiteboard: [country-all] [css] [contactready]
ni? on Michael to file a bug via our FB reporting channel.
Flags: needinfo?(hkirschner) → needinfo?(mellis)
Flags: needinfo?(mellis)
Whiteboard: [country-all] [css] [contactready] → [country-all] [css] [contactready] [fb:escalated]
Bug details provided to Fb's Mobilepartnerfeedback.  Will update bug when feedback is received from their team.
Thank you Michael.
Whiteboard: [country-all] [css] [contactready] [fb:escalated] → [country-all] [css] [sitewait] [fb:escalated]
If this issue is only occurring in Nightly, it is unlikely we will be able to get FB resources to work on a resolution at this time. If Fb wont fix for Firefox specifically, we should explore with our team what this means for beta and GA and then circle back to FB
(In reply to Michael Ellis from comment #12)
> If this issue is only occurring in Nightly, it is unlikely
> we will be able to get FB resources

This isn't Nightly-only -- this is reproducible on all branches, including release.

(This site bug should be visible in any browser that supports "min-width:auto" on flex items. We shipped that support in Firefox 34 [via bug 984711 & bug 1015474], which was released last week. I'd expect this bug to reproduce in IE's current "Tech Preview" release, as well -- that's the only other browser that I'm aware of that's implemented this.)
(See comment 5 for the suggested fix, too -- it's pretty minimal.)
Whiteboard: [country-all] [css] [sitewait] [fb:escalated] → [country-all] [css] [sitewait] [fb:escalated][suggested fix in comment 5]
Thanks for the clarification, that will be very help info when trying to get FB's attention on the issue. I will bounce this back to their team.
Assignee: nobody → mellis
Status: NEW → ASSIGNED
Flags: needinfo?(mellis)
Summary: Page Width on Facebook blog broken → Page Width on Facebook blog broken (due to implied "min-width:auto" & huge image included in blog post)
Summary: Page Width on Facebook blog broken (due to implied "min-width:auto" & huge image included in blog post) → Page Width on Facebook blog broken (due to new "min-width:auto" behavior on flex items, & huge image included in blog post)
Tested this bug and again after reporting to the FB team.  Blog page now renders properly in Firefox. marking this as Works for Me

 - Can someone confirm and close bug accordingly
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Flags: needinfo?(mellis)
Resolution: --- → WORKSFORME
Yup, the flex item in question (the parent of the wide-intrinsic-width <img> noted in comment 5) now has an explicit "max-width", which overrides the "min-width:auto" behavior that was involved here. (It sets an upper-bound for what "min-width:auto" resolves to.)

So, we can call this FIXED.
Resolution: WORKSFORME → FIXED
Product: Tech Evangelism → Web Compatibility
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: