Skip to content

Commit f6cfc1a

Browse files
committed
Fix #25: Add list style overrides
1 parent 0c9c73b commit f6cfc1a

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ Next version
2727
- Added integration testing using playwright.
2828
- Pruned the CI matrix a bit, stopped running tests using Python 3.11 and
2929
Django 5.0. Python 3.10 and Django 4.2 are still tested so we should be safe.
30+
- Added list style overrides to hopefully make lists usable with the Grappelli
31+
admin skin.
3032

3133

3234
0.10 (2024-12-17)

django_prose_editor/static/django_prose_editor/overrides.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/overrides.css

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,32 @@
6666

6767
/* List styling improvements */
6868
.ProseMirror ul {
69-
list-style-type: disc;
69+
list-style-type: disc !important;
70+
}
71+
72+
/* Fix for grappelli removing list styles */
73+
.ProseMirror ul {
74+
list-style-type: disc !important;
75+
}
76+
77+
.ProseMirror ol:not([type]) {
78+
list-style-type: decimal !important;
79+
}
80+
81+
.ProseMirror ol[type="a"] {
82+
list-style-type: lower-alpha !important;
83+
}
84+
85+
.ProseMirror ol[type="A"] {
86+
list-style-type: upper-alpha !important;
87+
}
88+
89+
.ProseMirror ol[type="i"] {
90+
list-style-type: lower-roman !important;
91+
}
92+
93+
.ProseMirror ol[type="I"] {
94+
list-style-type: upper-roman !important;
7095
}
7196

7297
.ProseMirror li {
@@ -86,6 +111,7 @@
86111
position: relative !important;
87112
margin: 0.1em 0 !important; /* Reduced space between list items */
88113
padding-left: 0 !important; /* No extra padding after marker */
114+
display: list-item !important; /* Explicit display for list items */
89115
}
90116

91117
.ProseMirror ol li::marker,

0 commit comments

Comments
 (0)