Have you read the Contributing Guidelines on issues?
Prerequisites
Description
Howdy! We are using docusaurus for the https://excaliburjs.com documentation site. Some of our users have reported issues with code snippets showing both the light and dark mode versions at the same time in older versions of safari. The docusaurus project is in the /site directory in the example link.
See issue excaliburjs/Excalibur#2981

With our investigation this seems to be because of the way that the :has pseudo class is used to show/hide the snippet. One possible fix is a simpler selector using backwards compatible css in docusaurus?

Reproducible demo
https://github.com/excaliburjs/Excalibur/tree/main/site
Steps to reproduce
- Run the docusaurus site locally https://github.com/excaliburjs/Excalibur/tree/main/site with npm run start
- On safari 12, 13, or 14 navigate to /docs/installation
- Observe the duplicated snippets for both light and dark mode

Expected behavior
Either the light mode code snippet or the dark mode snippet should appear on older versions of safari (12, 13, 14)
Actual behavior
Both versions of the code snippet appear
Your environment
Self-service
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clearoryarn clearcommand.rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages.Description
Howdy! We are using docusaurus for the https://excaliburjs.com documentation site. Some of our users have reported issues with code snippets showing both the light and dark mode versions at the same time in older versions of safari. The docusaurus project is in the /site directory in the example link.
See issue excaliburjs/Excalibur#2981
With our investigation this seems to be because of the way that the
:haspseudo class is used to show/hide the snippet. One possible fix is a simpler selector using backwards compatible css in docusaurus?Reproducible demo
https://github.com/excaliburjs/Excalibur/tree/main/site
Steps to reproduce
Expected behavior
Either the light mode code snippet or the dark mode snippet should appear on older versions of safari (12, 13, 14)
Actual behavior
Both versions of the code snippet appear
Your environment
Self-service