Two-liner for dark mode with beautiful code highlighting #2917
sirkadirov
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
|
This is really awesome! Thank for sharing! I would love for there to be a theme switcher somewhere, but hopefully that will arrive when a dark theme is officially supported. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! As you may know, Stoplight Elements has a hidden dark theme inside, but there's no info about it in the docs. Also, there's no option to trigger theme change when your device theme changes, and some elements of Stoplight are not adapted to dark mode.
So... here's a two-lliner to solve this 😃:
I hope that this would help someone who loves Stoplight as I am, but wants to have a darker version of it.
How I done that?
As Stoplight Elements uses Prism.js for code highlighting under the hood, I thought it would be great to adapt a dark version of the Nord theme for use with Stoplight. Used an amazing work from the official Prism.js themes repository to achieve this; also included a simple script that I published here earlier, fixed the resize panel color, and here we are, dark mode switching for Stoplight Elements finally arrived: https://github.com/sirkadirov/stoplight-elements-auto-theme 🎉
Showcase
Beta Was this translation helpful? Give feedback.
All reactions