-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
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
[docs][base] Improve Base UI all components images #37590
Conversation
@michaldudak So we'd add an explicit width in pixel on the parent Card? Uhm... is that the best approach? 🤔 |
Netlify deploy previewhttps://deploy-preview-37590--material-ui.netlify.app/ Bundle size report |
@michaldudak & @siriwatknp mind giving this one a second pass, please? 🙌 |
TL;DR: yeah, let's ship it ;)
Not necessarily. I've found out the root cause of fractional widths is the Now comes the (not so) fun part: images within cards are slightly smaller because cards have a 1px border. As I learned today, a 1px border isn't always a 1px border. Because I use 150% display scaling, my browsers (Edge and Firefox) render the border with 0.6667px width. This is (I assume) to ensure it occupies exactly one physical pixel and is crisp. This means we don't know the exact width of the rendered image because it depends on display scaling settings. So no matter what we do, it could be a little blurry for some users. Considering all the above, I suppose we can live with it. The version after the recent changes is better than before, so I'm ok with keeping it. |
@michaldudak Shoot, well, at least you & I definitely learned something while trying to optimize this 😅 I do need an approval, though, to merge it! 😅 |
A follow-up to #37536 to make images crispier. Also simplified the aspect ratio to a much more common one (16/9) and added explicit width and height sizes.