hugo-book icon indicating copy to clipboard operation
hugo-book copied to clipboard

delete color-scheme in head-html

Open tcitry opened this issue 2 years ago • 8 comments

This is a suggestion about #387, just have a look.

tcitry avatar Jul 26 '22 05:07 tcitry

Hm, perhaps we should set it to light/dark theme background color?

alex-shpak avatar Aug 02 '22 10:08 alex-shpak

You mean BookTheme in config.toml ? I set it auto, and preferred_color_scheme with giscus. so, there still have problem when I in dark mode in macOS.

image

tcitry avatar Aug 02 '22 11:08 tcitry

Perhaps

<meta name="theme-color" media="(prefers-color-scheme: light)" content="#ffffff">
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#343a40">

alex-shpak avatar Aug 02 '22 11:08 alex-shpak

I tried on my local, not fixed with <meta name="color-scheme" content="light dark"> 😅

tcitry avatar Aug 02 '22 12:08 tcitry

But remove <meta name="color-scheme" content="light dark"> and add snipped I posted.

alex-shpak avatar Aug 02 '22 12:08 alex-shpak

yes, it works.

tcitry avatar Aug 02 '22 12:08 tcitry

But this does not? I would expect that to work

<meta name="color-scheme" content="light dark">
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#ffffff">
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#343a40">

alex-shpak avatar Aug 02 '22 12:08 alex-shpak

No, its not work. I am confused too.

tcitry avatar Aug 02 '22 12:08 tcitry

Maybe it was a problem with giscus, and fixed with https://github.com/giscus/giscus/commit/15857d093d6115db81582cc56e01f2ce6c5ff18c, so this could be closed.

tcitry avatar Nov 12 '22 15:11 tcitry