-
-
Notifications
You must be signed in to change notification settings - Fork 285
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
Dark mode #1661
Dark mode #1661
Conversation
This looks really good @pbignardi, thanks so much! Can you resolve the merge conflicts? |
This is awesome, from a software engineering perspective! I tried to push a commit with some styling adjustments - can you give us access? I'll get a more detailed list soon! Great work overall!! |
Thank you for the kind words 😄 Shall I set you as collaborator in my forked repo? |
I also pushed some changes to resolve the conflicts earlier this morning. |
Can you check if you can do this process? if yes, it will be easier |
Done, box checked. Sorry, it's my first PR 😅 |
Oops I closed this by mistake - I messed the git - the commits got lost but managed to restore the code. |
Sorry, I'm quite newbie in project contributing. Are there any changes that I need to do to the code? |
Hi @pbignardi, thanks again for contributing! I think there were some technical problems because this PR is coming from the I think the PR will take a couple of weeks of tweaking from our side until we are happy with how all the styles look, and we will have to try how well it plays together with other packages, but the technical side looks really good! |
Oh, ok thank you for the heads up! I'll start looking for a new issue to contribute to 😄 |
Sorry for the slow response! The reason is: we think dark mode is a really exciting feature, and we are saving it up for our next big release, either |
It's exciting to see so much hype for this feature 😄 😎 |
Also removed SyntaxColorsParsers.js as it's no longer needed
Just noticed the background in the dark mode. Very nice, I like it! 👍🏻 |
We are getting close! TODO:
Future PR:
|
@fonsp Are you referring to this? |
Regarding this problem, the best solution would be to modify the CodeMirror config files, since in there it is defined the selection background color that it's used when in dark mode. Alternatively we could also bodge it by forcing such color afterwards by changing it in the css and using the !important keyword; not the cleanest solution but it works. Edit: fyi, in the |
there is a clean CSS solution, but we are looking for the right candidate color!! |
Fair point 😄 |
Ok I updated the color, I made it green. See if you like it 😉 |
This is awesome! 🎉 I want to test it; how should we do to activate the dark mode? 🌑 |
Just update to the latest version and set you operating system theme to dark! |
It seems that it doesn't work in Ubuntu 18.04. I have followed these instructions to set the dark mode on the system: https://nixytrix.com/how-do-i-enable-dark-mode-in-ubuntu-18-04/ |
What pluto version are you on? If you go here https://github.com/settings/appearance and set |
No, it doesn't work with the GitHub page either. So, it should be a problem with |
Ok. It was a problem with Chrome & Ubuntu; I have fixed it following this steps: https://radu.link/enable-dark-mode-chrome-ubuntu/ |
Addresses issue #23
Outline of the changes:
Extracted colors from
editor.css
into separate css filesAll the colors in
editor.css
have been replaced by CSS variables that are defined inlight_color.css
anddark_color.css
.These two files contains media queries to decide which of the variables to use depending on the prefered user theme.
For simplicity, all the variables are set in the
:root
scope, but the names are quite descriptive, in case they need to be modified down the line.Included
cm-cursor
andcm-docs-binding
styling ineditor.css
Styling for
cm-cursor
andcm-docs-binding
classes are moved ineditor.css
for clarity and improve code maintainability. CSS variables are created inlight_color.css
anddark_color.css
to specify the colors.Modified
CellInput.js
andFilePicker.js
to allow for dark themingThe default code-mirror setup only support light theming. An optional parameter was added to allow for dark theming in the cell input and file picker.
SVG graphics inverted
SVG graphics are reused with appropriate filters in
editor.css
. A good improvement would be to create custom svg graphics for the dark theme.Try this Pull Request!
Open Julia and type: