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

[split-view] fractional pixel widths cause 1px borders to disappear on some monitors #528

Open
MikeMatusz opened this issue Apr 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@MikeMatusz
Copy link
Contributor

MikeMatusz commented Apr 12, 2024

Describe the bug:
When using the forge-split-view, the panel widths get set to fractional values, which can cause sub-pixel rendering issues most noticeable on elements with border-width: 1px, such as forge-button elements. On my monitor, I usually just see the right border get thinner, but others see the border disappear entirely. The effect can be more pronounced at certain browser zoom levels.

I'd consider this more of a browser issue, honestly, and it might be out of our control, but it keeps coming up wherever we use this component because so many common elements have 1px borders. My only thought as to how to improve the situation would be to force the panel widths to round to the nearest pixel, though I'm not sure that would be compatible with with #388, unless we calculate fractional percentages corresponding to exact pixels, though that won't always be reliable.

To Reproduce:
Steps to reproduce the behavior:

  1. Create a layout using forge-split-view where there are some forge-button elements in each panel.
  2. Slowly resize the panels and watch the borders occasionally flicker, either becoming thinner or disappearing entirely depending on your monitor.

Expected behavior:
Borders should always remain visible.

Screenshots:
image

Please complete the following information:

  • Forge version: 2.22.0
  • I have searched existing issues before creating this report? Y
  • Browser: All
  • Platform: desktop
  • OS: All
@MikeMatusz MikeMatusz added the bug Something isn't working label Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant