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

Bug - [Patternfly Table] - [HiDPI (Retina Mac) rendering issue] #5016

Open
gruselhaus opened this issue Jul 29, 2022 · 7 comments
Open

Bug - [Patternfly Table] - [HiDPI (Retina Mac) rendering issue] #5016

gruselhaus opened this issue Jul 29, 2022 · 7 comments
Labels
bug Something isn't working pinned

Comments

@gruselhaus
Copy link

Describe the problem
The row dividers of the patternfly table component is rendered incorrectly on Apple Retina Displays in Safari. This issue affects probably all HiDPI screens but I could only test it on a Mac.

How do you reproduce the problem?
Due to the fact that this problem affects all pages with Patternfly Table, this error also appears in the official demos of Patternfly.
Just open this official patternfly demo on a Retina Mac in Safari => https://codesandbox.io/s/kkk1gd

Expected behavior
The dividers should be rendered uniformly and cleanly.

Screenshots
SCR-20220729-h3u
SCR-20220729-h2c
SCR-20220729-h03

@gruselhaus gruselhaus added bug Something isn't working needs triage Needs to be reviewed and prioritized labels Jul 29, 2022
@mcarrano mcarrano added needs info and removed needs triage Needs to be reviewed and prioritized labels Aug 1, 2022
@mcoker mcoker transferred this issue from patternfly/patternfly-react Aug 1, 2022
@mcoker mcoker removed the needs info label Aug 1, 2022
@mcoker mcoker removed their assignment Aug 1, 2022
@mcoker
Copy link
Contributor

mcoker commented Aug 1, 2022

Also visible in the basic examples - https://www.patternfly.org/v4/components/table/html

@mcoker
Copy link
Contributor

mcoker commented Aug 1, 2022

@mattnolting would you mind having a look at this?

@mattnolting
Copy link
Contributor

@gruselhaus @mcoker This is a known webkit bug https://bugs.webkit.org/show_bug.cgi?id=243167. Looks like safari is miscalculating td height and drawing a duplicate border (even when there is no border applied) for text-based alignment text-top, text-bottom, baseline, etc.

@stale
Copy link

stale bot commented Oct 2, 2022

This issue has been automatically marked as stale because it has not had activity in the last 60 days. It will be closed in 30 days if no further activity occurs.

@stale stale bot added the wontfix This will not be worked on label Oct 2, 2022
@mcoker mcoker added pinned and removed wontfix This will not be worked on labels Oct 14, 2022
@jiridostal
Copy link

This is still valid and furthermore was observed in Chrome too. Is there any plan on fixing this? I would appreciate more references on why this happens

@jelly
Copy link

jelly commented Nov 23, 2023

We've also encountered this in Cockpit-podman cockpit-project/cockpit-podman#1485 with some findings from @garrett here.

@garrett
Copy link

garrett commented Nov 23, 2023

We've seen this on when zoomed in on WebKit browsers, after reloading the page, when text-align is set to baseline and you have mixed elements (text and other things, like buttons). This becomes even more of a problem the more you zoom the page too.

We've seen the issue on standard DPI Linux with GNOME Web too, but only when zoomed. I'm guessing HiDPI is probably similar on Linux, but haven't tested it yet.

Details @ cockpit-project/cockpit-podman#1485

If you change the alignment to something other than baseline, it's fine.

One possible workaround might be to declare a text-baseline a second time (keeping the initial one for all other browsers) and use vertical-align: -webkit-baseline-middle. We'd need to check that it has the desired effect, of course, as this affects both WebKit and Blink (Gecko has -moz-middle-with-baseline). They might be similar enough to baseline but not trigger this bug. It'd require some testing.

Or we could change it to something else, like vertical-align: top... but that would likely have other alignment issues on all browsers when you mix text and other widgets (buttons, kebab menus, etc.). Or possibly vertical-align: middle, but then you'd have issues with 1-line-high text and lines of text that wrap, along with other differently sized text.

The alignment is not a problem with everything set at the same height (all 1-line-high text, for example); it becomes a problem for this bug (and any workarounds) when you have elements with different heights.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pinned
Projects
Status: No status
Development

No branches or pull requests

7 participants