What css snippet code can i use to use dashes in place of bullet points?

i’ve been trying to figure out how i can use dashes in place of the bullet points that automatically appear when you make lists using dashes. there’s an older request for this and i have tried inputting the code into a css snippet myself but it does not work. the code was:

.markdown-preview-view ul li::marker {
content: ‘–’;
}
.markdown-source-view.mod-cm6 .list-bullet:after {
content: “–”;
}

how can i make it so that the dashes ( this: - ) turn into proper em dashes and work in a list with the proper indenting as would happen with the bullet points? for example, ideally it would work like in google docs. i want to be able to continue using the dashes in the list when starting a new line, as with the lists. the regular two dashes – does not form any kind of list or indentation as a bullet point list would.

.markdown-preview-view ul li::marker {
content: '– ';
}
.markdown-source-view.mod-cm6 .list-bullet:after {
content: “–”;
}

i actually did not include one of the spaces in the above code as i was testing to see if changing parts of it would work. this is the proper code used in the older request form that was not working.

When copying CSS or codeblocks into a forum post please enclose the entire text block within four (or more :slight_smile: ) backticks. So that it looks something like:

````
.markdown-preview-view ul li::marker {
  content: '- ';
}
````

This ensure that we are sure you don’t have any quote issues in your code or CSS, which often in this case. Currently in your two posts you’ve got multiple quote variations, and we’re not sure what’s actually in your snippet.

1 Like
.markdown-preview-view ul li::marker {
content: '– ';
}
.markdown-source-view.mod-cm6 .list-bullet:after {
content: “–”;
}

this?

That second part needs to use straight quotes for starters. Try that, and see what happens then.

Are you only working in live preview? Not in reading mode?

I have copied and pasted directly from the previous obsidian help forum that this code comes from. I am not a coder, and this is a direct copy and paste. Please provide a code that I can copy and paste so that I know what is correct in which part.