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

doc: fix dark theme on empty location hash #21929

Merged
merged 1 commit into from
Jun 2, 2021

Conversation

felixmariotto
Copy link
Contributor

When accessing https://threejs.org/docs/ with a browser with dark theme preference, this is what shows up :

Screenshot_2

Tested on Chrome and Opera.

It seems that the iframe with an empty src has an opaque white background overlapping the body background.

Original dark mode support PR by @mrdoob for reference : #17729

After the commit :

Screenshot_3

@Mugen87
Copy link
Collaborator

Mugen87 commented May 31, 2021

I guess a similar fix makes also sense for examples. Without calling it without an example, dark mode looks like so:

image

@felixmariotto
Copy link
Contributor Author

I guess a similar fix makes also sense for examples.

It looks like this PR fixes https://threejs.org/examples/ as well.

@Mugen87
Copy link
Collaborator

Mugen87 commented May 31, 2021

It's a change in docs/index.html. How does this affect the examples page?

@felixmariotto
Copy link
Contributor Author

felixmariotto commented May 31, 2021

Indeed you are right... It's weird I can't reproduce the wrong dark theme at https://threejs.org/examples/ locally

Screenshot_4

I will investigate and make a new PR

@Mugen87
Copy link
Collaborator

Mugen87 commented May 31, 2021

It's weird I can't reproduce the wrong dark theme at https://threejs.org/examples/ locally

True. I wonder what makes the difference...

@mrdoob
Copy link
Owner

mrdoob commented Jun 2, 2021

TIL about unset 😮

@mrdoob
Copy link
Owner

mrdoob commented Jun 2, 2021

It's weird I can't reproduce the wrong dark theme at https://threejs.org/examples/ locally

True. I wonder what makes the difference...

I went down this rabbit hole before.
I concluded it was a bug in Chrome but was not able to spend enough time to figure out the details...

@mrdoob mrdoob added this to the r130 milestone Jun 2, 2021
@mrdoob mrdoob merged commit 43d9a8e into mrdoob:dev Jun 2, 2021
@mrdoob
Copy link
Owner

mrdoob commented Jun 2, 2021

Thanks!

mrdoob pushed a commit that referenced this pull request Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants