django-markdown-editor icon indicating copy to clipboard operation
django-markdown-editor copied to clipboard

Broken preview when using dark theme (Mac)

Open baidyprod opened this issue 1 year ago • 3 comments

Preview mode is broken on both bootstrap/semantic when system is using dark mode. Screenshot 2024-06-28 at 03 06 15 Screenshot 2024-06-28 at 03 07 06

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

  1. Switch to dark mode on your Mac system.
  2. Use Martor widget in your project.

baidyprod avatar Jun 28 '24 00:06 baidyprod

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.

ndjman7 avatar Jul 08 '24 11:07 ndjman7

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',),}
    ```

HlebKrah avatar Aug 07 '24 22:08 HlebKrah