Comments (3)
It's because the dark mode is implemented in javascript instead of css, which means the browser renders the page with a white background (and everything that goes with it) first, and then runs the javascript which redraws everything with a black background.
The solution is to rewrite this in CSS, using @media (prefers-color-scheme:dark)
to respect the user's choice, instead of javascript buttons.
If we want users to be able to use a different color scheme on this website than the rest of their browser, then we can implement a javascript override, but that's a detail IMO and not necessary for a first version.
I have implemented all of this (including the JS overrride) myself so feel free to ping me if you (or anyone else) wants to give this a shot :)
from docs.gl.
Submit a pull request and I would be happy to approve it :)
from docs.gl.
(actually, if you look at the website on my profile you'll have an example of this implemented, and it's a really tiny website so it shouldn't be too hard to read its CSS & JS code)
from docs.gl.
Related Issues (20)
- Offline version cannot really be used offline HOT 2
- formulas on glClipControl not rendering HOT 3
- HTTPS certificate expired HOT 1
- "Edit this page" link on docs.gl link to the master branch HOT 1
- Missing error case for glCopyTexImage2D
- typo noramlized instead of normalized on docs.gl/gl3/glVertexAttribPointer.xhtml
- Invalid InternalFormat in Documentation for glTexImage2D HOT 1
- OpenGL 4.6 missing HOT 2
- Question: sync with official refpages? HOT 6
- Active command category not automatically expanding on page-load HOT 1
- EndPrimitive documentation refers to incorrect base function
- Missing space between Type and Name, maybe CSS problem.
- Image atomic ops erroneously listed as supported in ESSL 3.10
- glGetShader function pointer does not exist, glGetShaderiv redirecting to glGetShader HOT 4
- Incorrect example for glTexImage2D for ES3
- [Request] Filter out search results that don't match specified version
- Enum of error for glBindBuffer for gl4 is wrong
- smoothstep documentation error? HOT 2
- Domain name problem. HOT 2
- glClearNamedFramebufferfi missing argument
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.gl.