Skip to content
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

Broken preview when using dark theme (Mac) #250

Open
baidyprod opened this issue Jun 28, 2024 · 2 comments
Open

Broken preview when using dark theme (Mac) #250

baidyprod opened this issue Jun 28, 2024 · 2 comments

Comments

@baidyprod
Copy link

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.
@ndjman7
Copy link

ndjman7 commented Jul 8, 2024

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.

@HlebKrah
Copy link

HlebKrah commented Aug 7, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants