-
Notifications
You must be signed in to change notification settings - Fork 9k
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
Feature - New - Dark Mode Toggle #10216
base: master
Are you sure you want to change the base?
Conversation
- Add DarkMode component - Add darkmode comp styling
How did you do it? |
From memory : It's a new component added to the top bar, when clicked, adds a new class "theme-dark" to the page. We have a new style sheet that styles all descendants of "dark-theme" appropriately. |
Hey, this is something I would love to see merged. One suggestion from my side would be to include support for prefers-color-scheme. |
@pgridharan I'd happily implement that, but I've heard no feedback from maintainers, so assumed PR was dead in the water :) Great suggestion , thanks |
Co-authored-by: Ed Brannin (BW) <86373302+ebrannin-bw@users.noreply.github.com>
Great suggestion @ebrannin-bw - but I doubt this work will ever see the light of day sadly ! |
Swagger UI does not directly support dark mode. See: - swagger-api/swagger-ui#5327 - swagger-api/swagger-ui#10216 Adding skin-invert fixes the appearance, and is straightforward to remove if direct support meeting our needs is ever added. Bug: T383483 Change-Id: I30c5030522e376c7114b000b2158637c3829c425
Please note, I am NOT a react developer, if you can improve this PR, please do so. I am happy to implement feedback!
I have provided a "dark mode" for swagger. Previously users have relied on third party provided stylesheets, or third party styling tools to achieve this. I believe it's a simple improvement that many users will actually find useful.
Description
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
( Screenshot shows the addition of the dark mode icon, in the Topbar )
( Screenshot showing darkmode theme active )
Checklist
My PR contains...
src/
is unmodified: changes to documentation, CI, metadata, etc.)package.json
)My changes...
Documentation
Automated tests