Fredkiss3/gh-next

[✨ feature] Implement dark/light favicon

Closed this issue · 0 comments

Is your feature request related to a problem? Please describe.

I want to show dark & light favicons.

Describe the solution you'd like

Use this example (copied from github) :

<link rel="alternate icon" class="js-site-favicon" type="image/png" href="https://github.githubassets.com/favicons/favicon-dark.png">
<link rel="icon" class="js-site-favicon" type="image/svg+xml" href="https://github.githubassets.com/favicons/favicon-dark.svg">

We just need to either listen for the data- attribute on html (we can do so in the RootLayout directly) and listen for dark/light media queries when the user's theme preference is system.

Describe alternatives you've considered
None.

  • Are you willing to make a PR for this ?