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

fix(client): avoid blurry images #9591

Merged
merged 2 commits into from
Oct 27, 2023
Merged

fix(client): avoid blurry images #9591

merged 2 commits into from
Oct 27, 2023

Conversation

kuubeu
Copy link
Contributor

@kuubeu kuubeu commented Aug 31, 2023

Summary

Fixes #9590.

Problem

When using 100% display scaling on 1X screens, images included on the website appear blurry — they inherit the size of the actual image, but are then pushed in by the border around them, making them no longer pixel-aligned. This is caused by box-sizing: border-box being applied to the images.

Solution

Set the box-sizing property to border-box on all images inside .main-page-content.


Screenshots

Before

old-blurry

After

new-sharp

@caugner caugner changed the title Fix blurry images fix(client): avoid blurry images Sep 18, 2023
@caugner caugner requested a review from LeoMcA September 18, 2023 13:53
@github-actions github-actions bot added the merge conflicts 🚧 Please rebase onto or merge the latest main. label Oct 26, 2023
@github-actions
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@kuubeu kuubeu requested a review from a team as a code owner October 26, 2023 19:11
@github-actions github-actions bot removed the merge conflicts 🚧 Please rebase onto or merge the latest main. label Oct 26, 2023
Copy link
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I don't see any drawbacks.

@caugner caugner merged commit 0829b7e into mdn:main Oct 27, 2023
10 checks passed
@caugner caugner removed the request for review from LeoMcA October 27, 2023 17:20
@kuubeu kuubeu deleted the image-rendering-fix branch October 27, 2023 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blurry images
2 participants