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

blog.cloudflare.com - Items are overlapped #48332

Closed
fede3mmanuel opened this issue Feb 15, 2020 · 19 comments
Closed

blog.cloudflare.com - Items are overlapped #48332

fede3mmanuel opened this issue Feb 15, 2020 · 19 comments
Labels
browser-firefox engine-gecko The browser uses the Gecko rendering engine form-v2-experiment priority-important severity-minor The site has a cosmetic issue.
Milestone

Comments

@fede3mmanuel
Copy link

URL: https://blog.cloudflare.com/serverlist-8th-edition/

Browser / Version: Firefox 74.0
Operating System: Windows 10
Tested Another Browser: Yes Chrome

Problem type: Design is broken
Description: Items are overlapped
Steps to Reproduce:
Down form the part that says " Received this email from a friend? Sign up here. ", There were sections (posts) that overlap the text with the images

View the screenshotScreenshot
Browser Configuration
  • None

From webcompat.com with ❤️

@webcompat-bot webcompat-bot added this to the needstriage milestone Feb 15, 2020
@softvision-sergiulogigan softvision-sergiulogigan changed the title blog.cloudflare.com - design is broken blog.cloudflare.com - Items are overlapped Feb 17, 2020
@softvision-sergiulogigan softvision-sergiulogigan added the severity-minor The site has a cosmetic issue. label Feb 17, 2020
@softvision-sergiulogigan

Thanks for the report!
I'm able to reproduce the issue.

Tested with:
Browser / Version: Firefox Nightly 75.0a1 (2020-02-16)
Operating System: Windows 10 Pro

Moving to Needsdiagnosis.

@karlcow
Copy link
Member

karlcow commented Feb 17, 2020

Safari top, firefox middle, chrome bottom

Screenshot

Let's have fun.

@karlcow
Copy link
Member

karlcow commented Feb 17, 2020

this is coming from an iframe with a huge escaped srcdoc with the rest of the document, which is a big set of… nested tables from the 90s. :)

<iframe id="magic"
        style="visbility: hidden;"
        seamless=""
        scrolling="no"
        srcdoc="

">

It upsets all 3 browsers devtools.

Chrome seems to recover the best here for this specific layout.
@emilio do you have an opinion?

also @digitarald for the performance impact on devtools.

I'm pushing this to to needscontact with a… change the way you do the design? That seems a bit tortured for such a simple page.

@digitarald
Copy link

@karlcow could you file an issue with a performance profile – not sure what issue I should see when inspecting the site.

@karlcow
Copy link
Member

karlcow commented Feb 18, 2020

@digitarald
image

done already ;) this morning.
https://bugzilla.mozilla.org/show_bug.cgi?id=1616139

@emilio
Copy link

emilio commented Feb 19, 2020

This seems a somewhat weird interaction between flex and table layout.

Firefox seems to be honoring the width: 100% that is in the following rule (inside a media query):

.tableStack {
    width: 100% !important;
}

Here's a reduced test-case:

<!doctype html>
<table style="border-collapse: collapse; width: 100%; margin: 0 auto">
  <td style="display: flex; align-items: center; width: 90%; padding: 10px 5%">
    <table style="border-collapse: collapse; width: 100%">
      <td style="text-align: center">
        <img width=200 height=200 style="margin: 0 auto">
      </td>
    </table>
    <table style="border-collapse: collapse; width: 100%">
      <td style="text-align: center">
        Some text here.
      </td>
    </table>
  </td>
</table>

It's not clear to me what's the correct behavior per spec... cc @atotic / @cbiesinger / @FremyCompany, in case you know what is going on with Chromium there... off-hand I don't know why the width: 100% in the <table>s should be treated specially.

@emilio
Copy link

emilio commented Feb 19, 2020

@karlcow we should probably contact the site to remove that rule in particular. It seems the intention is to force the image and the content to be in different lines, but clearly no browser is doing that (maybe EdgeHTML used to?).

@FremyCompany
Copy link

@atotic
Copy link

atotic commented Feb 19, 2020

Lots going on in that testcase. Here is a simpler one:

<div style="display:flex;width: 100%;">
  <div id=d1 style="background:yellow;width:100%">
    <img width=200 height=200 style="margin: 0 auto">
  </div>
  <table id=t1 style="background:blue;width:100%">
    <td>table</td>
  </table>
</div>

The difference between Chrome and FF is how percentage width is resolved for TABLE flex item. I think Chrome is correct here. In FF, The div#d1 resolves its %ge against flex item size, table#t1 resolves percentage against flex container size.

As I have been rewriting tables for Chrome, there is another table sizing inside flexbox issue I've encountered. It it about table's minmax size inside flexbox. Following table per spec has an infinite max size.

<table>
  <td style="width:10px">10</td>
  <td style="width:100%">100%</td>
</table>

Chrome currently does a wacky thing to avoid this, and ignores percentage cells when calculating minmax inside Flexbox.

The NG rewrite will bring Chrome's tables a lot closer to what FF is shipping. There are still some issues like the one above I'd like to align on. It be useful to have a f2f.

@emilio
Copy link

emilio commented Feb 19, 2020

cc @dholbert

@karlcow
Copy link
Member

karlcow commented Feb 19, 2020

This fixes the design.

/* Inline #-1 | https://blog.cloudflare.com/serverlist-8th-edition/ */

@media only screen and (max-width: 650px) {
		.tableStack {
				/* width: 100% !important; */
		}
}

@karlcow
Copy link
Member

karlcow commented Feb 19, 2020

@samjbmason or @mrmrs could you help us find the right person at cloudflare who can solve this issue in the layout of the cloudflare blog? That would be great. Thanks. See the details and screenshots in this thread.

@karlcow karlcow modified the milestones: needscontact, sitewait Feb 19, 2020
@karlcow
Copy link
Member

karlcow commented Feb 28, 2020

maybe more chances with @sssilver
There's a simple css issue to solve on cloudflare blog. it would be cool if you could help us find the right person who can change the css so firefox users can enjoy a better website. Suggestion given in the issue here.

@sssilver
Copy link

Hi @karlcow! I'll be happy to help. Let me see what I can do and get back.

@zackbloom
Copy link

Hello! I work on the blog at Cloudflare. We will do our very best to get this fixed in the next release. Thank you for bringing it to our attention.

@zackbloom
Copy link

zackbloom commented Feb 28, 2020

This is actually much more gnarly than I realized. That iframe is the output of an email which is designed using Marketo's email generation UI. We can use a Cloudflare Worker to remove that bit of CSS, but the real solution would be to have them change the way they generate CSS. Unfortunately the way they write that CSS is likely to maintain compatibility with email clients which will make all of this rather complicated.

@karlcow
Copy link
Member

karlcow commented Mar 2, 2020

So i can see a couple things that could be done.

There's another issue with the current design. the full text is not readable. It's not only the overlapping.

And if i do this in the cloudflare css, the issue is solved but only for large screens.

/* cloudflare.min.css | https://blog.cloudflare.com/assets/built/cloudflare.min.css?v=643ed3434b */

@media screen and (min-width: 60em) {
		.measure-wide-l {
				/* max-width: 34em; */
		}
}

.measure-wide-tablet {
		/* width: 34em; */
		width: 37em;
}

The problem comes back on tablet layout.

Note also that the text is currently fully unreadable on Safari. (edit: fixing firefox will not solve safari issue)

@softvision-oana-arbuzov
Copy link
Member

softvision-oana-arbuzov commented Jun 2, 2021

The issue has been fixed. The layout is displayed correctly now both on Firefox and Safari.
image

Tested with:
Browser / Version: Firefox Nightly 91.0a1 (2021-06-01) , Safari 14.1 (16611.1.21.161.6)
Operating System: Windows 10 Pro, MacOS 11.3.1

@fede3mmanuel
Copy link
Author

Thanks for all :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser-firefox engine-gecko The browser uses the Gecko rendering engine form-v2-experiment priority-important severity-minor The site has a cosmetic issue.
Projects
None yet
Development

No branches or pull requests