agusmakmun / agusmakmun/django-markdown-editor

CSS styles are conflicting with Django Admin

Ouverte
#185 9 commentaires 2 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
901
Forks
1.3k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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:

```css
.collapse:not(.show) {
display: none;
}
```

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 in `martor-admin.css`:

```css
h2 {
font-size: 16px!important;
margin: 1em 0 0.5em 0!important;
}
```

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.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Start with martor-admin.css and inspect how its unnamespaced rules are applied in the Django admin, especially the collapse and h2 examples. Scope the affected styles to the preview box, then verify that the Bootstrap collapsible fieldsets, admin headings, and preview styling display correctly.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
css, django
Domaine
frontend
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.