django-markdown-editor
django-markdown-editor copied to clipboard
Broken preview when using dark theme (Mac)
Preview mode is broken on both bootstrap/semantic when system is using dark mode.
Details
- OS (Operating System) version: MacOS 14.5
- Browser and browser version: Safari 17.5
- Django version: 4.2.13
- Martor version & theme: 1.6.44, both bootstrap and semantic
Steps to reproduce
- Switch to dark mode on your Mac system.
- Use Martor widget in your project.
In martor/css/martor-admin.css, because of the prefers-colour-scheme: dark option
This is being affected by the operating system's settings.
To fix it, you can add MARTOR_ENABLE_ADMIN_CSS = False to settings.py to make the CSS slightly broken.
But fundamentally, it needs to be improved to match Django's code.
Better temp fix:
create /static/admin/custom.css and put .main-martor { color: #000 !important; }
add to admin class:
class Media:
css = {'all': ('admin/custom.css',),}
```