When I have a bulleted list which includes checkboxes, the bullets fail to render. I’m not sure if this is a feature or a bug. It is a bit tricky to control, that is for sure.
1. [] normal numbered item with checkbox
- normal bullet
- [] example bulleted checkbox
[] example bulleted item 2
- [] example bulleted item 3
- [] example bulleted item 4
- [] example bulleted item 5
@Firepup650 Nice find! Any character added in front of the checkbox will make the bullet points visible.
List
. Dot
' Single quote (like in Excel text without formatting)
| Pipe
For a general solution: add this custom CSS to your Discourse instance.
ul li.has-checkbox .list-item-checkbox {
position: relative;
left: 0;
}
.cooked ul li.has-checkbox,
.d-editor-preview ul li.has-checkbox {
position: relative;
list-style-type: disc;
}
.cooked ul ul li.has-checkbox,
.d-editor-preview ul ul li.has-checkbox {
list-style-type: circle;
}
.cooked ul ul ul li.has-checkbox,
.d-editor-preview ul ul ul li.has-checkbox {
list-style-type: square;
}
Feature: add special notation to keep bullet points in checkbox-lists
If there is a list of checkboxes right now the list is shown without bullet points.
- [] point 1
- [] point 2
- [] point 3
- [] point 4
point 1
point 2
point 3
point 4
Adding a single quote (e.g. Excel text without formatting) in front of the checkbox is already disabling this feature and bullet points are visible, but additionally the single quote should be removed.
- '[] point 1
- '[] point 2
- '[] point 3
- '[] point 4
' point 1
' point 2
' point 3
' point 4
<!---
This markdown code:
-->
- '[] point
<!-- should become HTML: (note: no single quote visible) -->
<ul>
<li><span class="chcklst-box fa fa-square-o fa-fw"></span> point</li>
</ul>
<!-- instead of this HTML: (note: single quote still visible) -->
<ul>
<li>'<span class="chcklst-box fa fa-square-o fa-fw"></span> point</li>
</ul>
A simpler fix / tidy up for this could be that a 2nd space (as in a normal space, not a zero pt space) can indicate that it should display both the bullet and the checkbox.
Of course, that might be a right headache to code!