Commit 4706807
fix(editor): render list markers in block editor web component (#36249)
## Block Editor: list markers not rendering in the web component
Bullet and ordered lists rendered **without markers** (no
bullets/numbers) in the new Block Editor when it runs as the
`dotcms-block-editor` web component. Follow-up to #36235, found during
the #35980 bug hunt.
### Root cause
The editor was relying on the host page's Tailwind `prose` to render
list markers — a fragile dependency for a web component meant to drop
into arbitrary host pages. Two host-cascade effects defeated it:
1. **Tailwind preflight** resets `ol, ul, menu { list-style: none }` in
`@layer base`. In the web-component build's layer order this **beats
`prose`**, so `<ul>`/`<ol>` lost their markers.
2. The admin **JSP** additionally ships an unlayered `li { list-style:
none }` set *directly on the `<li>`*, overriding the `list-style-type`
the `<li>` would otherwise inherit from its list parent. On top of that,
prose colors `li::marker` a light gray.
### Proposed Changes
Add **self-contained, unlayered** list CSS to `editor.component.css` so
markers render regardless of the host's Tailwind/prose setup (same
pattern the file already uses for tables/code/figures):
- `ul → disc`, `ol → decimal`, with `padding-left` so the markers are
visible (`list-style-position: outside` paints them in the indent).
- Nested-marker cycling: `disc → circle → square`.
- `li { list-style: inherit }` — re-derives the marker from the list
parent, defeating the JSP's `li { list-style: none }`. `.tiptap li`
(0,2,1) out-specifies JSP's `li` (0,0,1).
- `li::marker { color: currentColor }` — markers match the editor text
instead of prose's gray.
- Tight `li` / `li > p` spacing so markers align with the first line of
text.
### Checklist
- [ ] Tests — N/A (no specs in `new-block-editor`; verified via build +
manual)
- [ ] Translations — N/A (CSS only)
- [x] Security Implications Contemplated — none (presentation-only)
### Additional Info
- Scope: editor content lists (`.tiptap ul/ol/li`); unlayered so it wins
over layered Tailwind resets in **both** the web-component
(`dotcms-block-editor`) and Angular (`dot-block-editor`) hosts.
- Production build passes (`nx run dotcms-block-editor:build
--configuration=production`); the bundle-budget line is a pre-existing
warning unrelated to this change.
### Video
https://github.com/user-attachments/assets/31387ee8-5d23-4041-b79e-3f4c92c3ad42
Related to #35980
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent e0fbb1d commit 4706807
1 file changed
Lines changed: 57 additions & 0 deletions
Lines changed: 57 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
136 | 193 | | |
137 | 194 | | |
138 | 195 | | |
| |||
0 commit comments