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

Make the ReactOS logo look less blurry on big screens #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ColinFinck
Copy link
Member

No description provided.

@Extravert-ir
Copy link
Member

Why it was blurry?

@ColinFinck
Copy link
Member Author

Had to edit the HTML to get rid of logo-small (what was that ever for?) and not sure if I broke something, so please have a second look.
Also it may or may not be wise to put the height and width statements into a CSS file instead of a style tag.

@ColinFinck
Copy link
Member Author

Why it was blurry?

It was 225x54 pixels, which is the exact size for a 96dpi screen.
However, people have screens with higher DPI these days (check your smartphone) and browsers enlarge the entire content on these screens. The logo then looks blurry.

Doing graphics pixel-exact on website was great 10 years ago, but that's no longer the case

@Extravert-ir
Copy link
Member

.navbar-brand has it's height set (in our current style to 62px). So it would be less hacky to set a style for image .navbar-brand img {height: inherit} and adjust .navbar-brand style if needed. Btw, default height in bootstrap is 50px

@Extravert-ir
Copy link
Member

Looks like logo image has a transparent gap on the top, but doesn't have a matching bottom gap

@ColinFinck
Copy link
Member Author

.navbar-brand has it's height set (in our current style to 62px). So it would be less hacky to set a style for image .navbar-brand img {height: inherit} and adjust .navbar-brand style if needed.

Sounds nice! Would that resize the image proportionally these days or do I still have to set a matching width myself? (as in early CSS/HTML days)

@binarymaster
Copy link
Member

For me it looks less blurry before this PR. 😅

BEFORE:

image

AFTER:

image

@Extravert-ir
Copy link
Member

Would that resize the image proportionally these days or do I still have to set a matching width myself? (as in early CSS/HTML days)

Oh, I don't remember that times :) You can safely set only one dimension

@ColinFinck
Copy link
Member Author

For me it looks less blurry before this PR. 😅

Does any of these CSS properties help: https://css-tricks.com/almanac/properties/i/image-rendering/ ?

@binarymaster
Copy link
Member

Does any of these CSS properties help: https://css-tricks.com/almanac/properties/i/image-rendering/ ?

Tried image-rendering: crisp-edges; - seems not supported by Chrome.

image-rendering: pixelated; looks ugly. 😅

class="hidden-xs hidden-sm">
<img src="{{ .Site.BaseURL }}{{ .Site.Params.logo_small }}" alt="{{ .Title }} logo"
class="visible-xs visible-sm">
<img src="{{ .Site.BaseURL }}{{ .Site.Params.logo }}" alt="{{ .Title }} logo" style="height: 54px; width: 227px;">
Copy link
Contributor

Choose a reason for hiding this comment

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

Problem basically is that we're enforcing Site.Params.logo por any kind of resolution. Reactos_0.png seems to be a 227x54 image, and this is cool for small devices but not for bigger resolutions.
The trick here is to use "srcset" instead "src": <img srcset=" {{ .Site.BaseURL }}{{.Site.Params.logo}} 1x, {{.site.BaseUrl }}{{.Site.Params.biggerlogo}} 2x" src="{{.site.BaseUrl }}{{.Site.Params.biggerlogo}}" alt="{{ .Title }}>
And a Bigger Logo is needed. This is the easiest trick, otherwise we would need to use "size".

Copy link
Member

Choose a reason for hiding this comment

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

We probably need to use SVG then.

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.

4 participants