python-docs-theme icon indicating copy to clipboard operation
python-docs-theme copied to clipboard

Dark theme: Inconsistencies after changing vs after reload

Open JulienPalard opened this issue 2 years ago • 3 comments

See screenshots: https://mamot.fr/@[email protected]/110045308238629406

One is "right after changing to dark", the other is "after reloading the page on dark".

JulienPalard avatar Mar 19 '23 08:03 JulienPalard

Copying the details over:

Firefox on iPhone

  1. Go to https://docs.python.org/dev/
  2. Switch from light to dark

Actual result: some of the input fields remain in light mode

Expected result: all input fields switch to dark mode

light at step 1 dark after clicking selector dark after reload

hugovk avatar Mar 21 '23 21:03 hugovk

I can't reproduce on Chrome/Android, Chrome/macOS or Firefox/macOS (desktop and mobile mode), but can reproduce with Safari/macOS (desktop and mobile mode).

It would be good to fix this, but I don't think it's a showstopper: the colours load as expected on the next link click or reload.

cc @septatrix

hugovk avatar Mar 21 '23 21:03 hugovk

I only have Chrome/Android, Chrome/Linux and Firefox/Linux and cannot reproduce it there. My initial guess is that Safari might not properly respond to a changing color-scheme: dark; as that is mostly responsible to style the so called "replaced elements" (selects, inputs, etc) which seem to be affected here. Maybe explicitly setting color-scheme: light in the light theme would help such that Safari notices that the value changes though someone else would have to try that.

septatrix avatar Mar 21 '23 23:03 septatrix

I can't reproduce this on (Chrome, Safari, and Brave)/MacOS. This issue is resolved.

ishan-sharma-3004 avatar Jun 13 '24 23:06 ishan-sharma-3004

I can reproduce this on Safari 15.6 (Monterey) but not on Safari 16.5 (Ventura).

15.6:

https://github.com/python/python-docs-theme/assets/3275593/a29d519c-8e04-422b-aed7-b67e4b91560a

16.5:

https://github.com/python/python-docs-theme/assets/3275593/4f97be0b-1fbd-4bcc-b01c-4e5cb9682255

I'm gonna say this was a Safari bug that has been fixed in Safari 16.

pradyunsg avatar Jun 14 '24 04:06 pradyunsg