-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
CSS styles are conflicting with Django Admin #185
Comments
It also messes with inlines. I wondered why my last inline elements weren't saved on an admin form. It seems like it's because Django admin uses a hidden inline that Martor "un-hide", but it is not functional. From https://stackoverflow.com/questions/22514186/django-inlines-do-not-save :
|
I thinking to use css namespace to prevent the conflict. Related issue: #180 |
In order to work around this issue, we forked the branch and removed the martor-admin.css file from the MartorWidget class like so:
We couldn't see what the martor-admin.css was adding to this package. Obviously this is a hack, but in case anybody else is running into this issue. A full fix would likely require namespacing the file, as mentioned by @agusmakmun |
Please note that bootstrap theme (
I tried using semantic theme but it does not play nicely with other admin plugins I'm using. Having a CSS theme in a namespace would be great and would probably fix this! |
Any updates on this one? |
Hello everyone, did you guys tried to upgrade the version?
Hopefully this fixed in the latest version. |
I still have this issue with version=1.6.44. |
I think the issue does not lie in martor-admin.css or martor.bootstrap.css but instead in the plugins bootstrap.min.css. My proposed solution is to add I did that on my fork for bootstrap.min.css but you would need to do that as well for semantic.min.css etc.. |
When loading martor in the admin, it loads CSS rules which overrides many admin styles. For example, when using bootstrap theme, it causes collapsible fieldsets to be completely hidden:
Even when using the "semantic" theme, there are many style definitions that are not namespaced, and causes default admin styles to be overriden, for example,
h2
headings look way to big because of this rule inmartor-admin.css
:I'm assuming these style definitions are only meant for the preview. If that's the case, then they should be namespaced to the preview box.
The text was updated successfully, but these errors were encountered: