-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Editor in dark mode can't be seen #6573
Comments
This is because Gitea uses SimpleMDE as the editor. Gitea's own dark theme, does not swap SimpleMDE to a dark theme. It should be relatively easy: see https://github.com/xcatliu/simplemde-theme-dark, though I'm not entirely sure where the change would have to be done in Gitea's templates. |
If it helps not all syntaxes seem to be affected. My screenshots show YAML, but I recall Go and JS not being affected. |
Yeah, the editor reuses classes based on highlighting mappings; anything that ends up with class |
So, the question is whether https://cdn.rawgit.com/xcatliu/simplemde-theme-dark/master/dist/simplemde-theme-dark.min.css can be imported after https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css and if having it always there affects the rendering of non simplemde components. If you can have the dark simplemde theme loaded after the normal and it doesn't affect anything else, then you could just add an import to it at the top of the Gitea dark theme. |
I'll try later today by editing |
Simplemde is only used for creating markdown files / editing the wiki. For all other files, Gitea uses Codemirror. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
Tried https://cdn.rawgit.com/xcatliu/simplemde-theme-dark/master/dist/simplemde-theme-dark.min.css defaultwith simplemde-theme-dark.min.css |
i suggest to add an additional dark theme file to gitea and switch this on dark mode via class name. Variant Athemes could be found here: https://codemirror.net/demo/theme.html#lucario to switch theme: load theme css + change the Variant BCreate some gitea own dark theme via UI Theme Editor on this website: (optional) convert the XML file from theme editor to codeMirror theme css file with this tool I hope this tool still works. EDIT: Variant C(as lunny added 3 vote buttons :) manually write dark theme in css file, prefix codemirror classes with e.g. To create a PR to switch css classes shouln't be to hard. I would just need a appropriate theme file. Does Github allow voting? Let me know if you choose A and which theme you would prefer, I could create such PR. If someone knows what aesthetics means (I don't know such a thing :) ) and has some luck with styling just present a screenshot and present XML or CSS file from variant B here. |
I'd choose B; if we want to avoid situations like this in the future, we'd best keep control of gitea's own themes instead of hoping that eventual upstream changes won't break anything. I will try recreating the alternative color scheme I created a few weeks ago in the theme-editor you linked; but it'll have to wait until my days calm down a bit (just changed jobs). |
@Cherrg You can vote as below 👍 A |
fix go-gitea#6573 Signed-off-by: Michael Gnehr <[email protected]>
* modify dark codemirror theme fix #6573 Signed-off-by: Michael Gnehr <[email protected]> * add selection color Signed-off-by: Michael Gnehr <[email protected]>
* modify dark codemirror theme fix go-gitea#6573 Signed-off-by: Michael Gnehr <[email protected]> * add selection color Signed-off-by: Michael Gnehr <[email protected]>
N/A
[x]
):Description
When editing files in dark mode text can't be distinguished.
Theme applied for syntax highlighting seems different than the one used in browsing mode.
Screenshots
The text was updated successfully, but these errors were encountered: