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 fallback favicon contrast issues #5818

Merged
merged 3 commits into from
Dec 18, 2023
Merged

Fix fallback favicon contrast issues #5818

merged 3 commits into from
Dec 18, 2023

Conversation

delucis
Copy link
Member

@delucis delucis commented Dec 17, 2023

Description (required)

Updates our fallback favicon (a .ico file used by browsers that don’t support SVG favicons — primarily Safari) to a variant with a background colour.

The current fallback favicon uses a transparent background, making the white “A” in the Astro logo more or less invisible in light mode browsers (see #5792). In the main SVG favicon the “A” switches colour automatically based on user colour scheme, but we can’t use the same approach for the static fallback.

I opted for a solid background colour as the cleanest solution here. I also experimented with a dark outline around the logo, but at the small scale used for favicons, this looks pretty ugly.

Here’s a quick before/after side-by-side, which also helpfully demonstrates the contrast issue:

old and new favicons with the old one barely visible with the white A on a white background and the new one clearly visible with a dark background behind the white A

Related issues & labels (optional)

@delucis delucis added the site improvement Some thing that improves the website functionality - ask @delucis for help! label Dec 17, 2023
Copy link

vercel bot commented Dec 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Dec 18, 2023 2:33pm

@mingjunlu
Copy link
Contributor

mingjunlu commented Dec 18, 2023

Looking good!

Light Mode Dark Mode
safari-light safari-dark

@sarah11918
Copy link
Member

image

Should i be able to see this in the preview? I still see this @delucis

@delucis
Copy link
Member Author

delucis commented Dec 18, 2023

Should i be able to see this in the preview? I still see this @delucis

Favicons are usually cached pretty aggressively, so perhaps not. Is that Chrome? You might be able to force it with a “force reload” (Ctrl + Shift + R I think? If not, from the View menu when pressing Shift.)

@sarah11918
Copy link
Member

Couldn't seem to force a reload on my end, but I'll trust you and will report back if it doesn't eventually work!

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

Looking forward to this, as I'm affected myself!

@delucis delucis added the Merge Queue Approved and ready to be merged (wait for feature release if also labelled M-O-R)! label Dec 18, 2023
@delucis delucis merged commit ac64268 into main Dec 18, 2023
6 checks passed
@delucis delucis deleted the dx-875/favicon branch December 18, 2023 15:38
ematipico pushed a commit that referenced this pull request Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Merge Queue Approved and ready to be merged (wait for feature release if also labelled M-O-R)! site improvement Some thing that improves the website functionality - ask @delucis for help!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Low Contrast Favicon in Safari
3 participants