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

Missing theme-color meta tag #343

Closed
wemiprog opened this issue Nov 3, 2022 · 2 comments · Fixed by #379
Closed

Missing theme-color meta tag #343

wemiprog opened this issue Nov 3, 2022 · 2 comments · Fixed by #379
Labels
bug Something isn't working

Comments

@wemiprog
Copy link

wemiprog commented Nov 3, 2022

What happened?

First, very cool theme!

The auto darkmode is very nice. But it has one problem, especially on iPhone, (when darkmode enabled), there is a white surrounding when you zoom the tab in.

What is missing (I tested it that way and it worked) is:

<meta name="theme-color" media="(prefers-color-scheme: light)" content="white" />
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#1f2937" />

The second color (#1f2937) seems to be the default background color, this could be replaced with the background color var.

can you add this to the default head in each generated html?

Is there a possibility to add it to the generator myself as long as you it isn't fixed?

I only modified the generated file.

Theme version

latest

Hugo version

latest

What browsers are you seeing the problem on?

Firefox, Chrome, Safari, Microsoft Edge

Relevant Hugo log output

-
@wemiprog wemiprog added the bug Something isn't working label Nov 3, 2022
@jpanther
Copy link
Owner

jpanther commented Nov 8, 2022

Thanks for the report. I'm aware that the theme currently doesn't include the theme-color meta tag however this has been by choice. The issue with this tag is that it will reskin certain browsers and that can have unintended consequences depending on the colour scheme being used in the theme and the auto-switching dark mode.

I haven't been able to settle on a clean way to implement this without having these side effects. You can certainly include this in your own site though by using the extend-head.html partial.

@jpanther jpanther changed the title Missing theme property Missing theme-color meta tag Nov 8, 2022
jpanther added a commit that referenced this issue Nov 21, 2022
@jpanther jpanther added the wip Work in progress label Nov 21, 2022
@jpanther
Copy link
Owner

After a little bit of research, I've created PR #379 to add basic support for this feature.

@github-actions github-actions bot removed the wip Work in progress label Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants