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

Code examples on website are shown in light and dark mode always #2981

Closed
uvd540 opened this issue Mar 25, 2024 · 5 comments
Closed

Code examples on website are shown in light and dark mode always #2981

uvd540 opened this issue Mar 25, 2024 · 5 comments
Labels
bug This issue describes undesirable, incorrect, or unexpected behavior wontfix Applied to issues that work as intended or out of scope for the project

Comments

@uvd540
Copy link

uvd540 commented Mar 25, 2024

Steps to Reproduce

  1. Open Firefox (maybe other browsers too?).
  2. View any of the documentation pages. For example, the Hello World example.
  3. Toggle dark mode on/off. In either case, each code example is shown in both light and dark modes.
    image

Expected Result

Only see the light/dark code examples based on dark mode preference

Actual Result

Seeing both code examples no matter what mode is selected

Environment

  • Firefox 115.9.1esr (64-bit)
  • macOS 10.14
  • Excalibur versions: Current

Current Workaround

None

@eonarheim eonarheim added the bug This issue describes undesirable, incorrect, or unexpected behavior label Mar 25, 2024
@eonarheim
Copy link
Member

@uvd540 Thanks for the bug! Very interesting I'm not able to repro on FF 124.0.1 on windows.

I'll do a little digging on what's going on, possibly a bug in FF?

What does Chrome/Safari show for you?

@uvd540
Copy link
Author

uvd540 commented Mar 27, 2024

I'm seeing the same issue on Safari as well. I don't have Chrome installed, but can install it to help debug further. Let me know.
image

@eonarheim
Copy link
Member

I can reproduce it on browserstack with:

  • Mojave/Safari 12
  • Catalina/Safari 13
  • BigSur/Safari 14

image

Things only appear to work as intended at Monterey/Safari 15

I think it relates to this pseudo class selector using a :has() which isn't supported until Safari 15.4 and Firefox 121 https://caniuse.com/css-has.
image

This feature comes pre-bundled with Docusaurus v3 which we use for documentation, I'll see if their issue tracker has anything relating to this.

@kamranayub any ideas?

@eonarheim
Copy link
Member

It looks like we've fallen off the older safari support by default in browserlist

https://docusaurus.io/docs/browser-support

❯ npx browserslist --env="production"
Need to install the following packages:
  browserslist@4.23.0
Ok to proceed? (y) y
and_chr 122
and_ff 123
and_qq 14.9
and_uc 15.5
android 122
chrome 122
chrome 121
chrome 120
chrome 119
chrome 109
edge 122
edge 121
firefox 123
firefox 122
firefox 115
ios_saf 17.4
ios_saf 17.3
ios_saf 17.2
ios_saf 17.1
ios_saf 16.6-16.7
ios_saf 16.1
ios_saf 15.6-15.8
kaios 3.0-3.1
kaios 2.5
op_mini all
op_mob 80
opera 108
opera 107
opera 106
safari 17.4
safari 17.3
safari 17.2
samsung 23
samsung 22

@eonarheim
Copy link
Member

@uvd540 @mattjennings I've opened an issue against docusaurus for this facebook/docusaurus#10074

I'm going to close this issue as wont fix for now.

@eonarheim eonarheim added the wontfix Applied to issues that work as intended or out of scope for the project label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue describes undesirable, incorrect, or unexpected behavior wontfix Applied to issues that work as intended or out of scope for the project
Projects
None yet
Development

No branches or pull requests

2 participants