Separate ordered list styles?

What I’m trying to do

TL;DR: I want to find a way to use the default unordered/ordered list styles, while also having available a custom outline style for lists that sequences like XXX(a)(2)(A)(ii)(IV). Like below:

I deal a lot with the U.S. Code and the Code of Federal Regulations (e.g., this). While it’s best practice to use a legal research service to keep tabs on the laws and regulations, I mostly deal with immigration law, which basically never changes. It’s convenient to have readily-accessible notes that let me link out from e.g., a client note, to the relevant provision of a law/regulation, and also track backlinks from that provision to see which other clients have dealt with similar issues. At least that’s the theory…

Things I have tried

I know how to set my obsidian.css file to include the OL list-style-types (e.g., ol ol ol { list-style-type: upper-roman } for each level of the list. But I don’t know how to make it so that either I can toggle between list styles (e.g., default ordered lists 1, 2, 3, or outline ordered list (a)(2)(A)(ii)(IV)) or just reserve a list style for particular notes/templates. I gather that perhaps my only option is to (1) define a ‘cssclass’ in my obsidian.css file and then (2) call that class in the YAML of notes that I want to have the outline-styled ordered list. Is that right? If so, does anybody know how, or have resources to point to how to create an ordered list outline sequence as a cssclass?

If not…any other ideas? It’s sort of petty, and I realize the easiest way is probably to just do an unordered list and start every line with the relevant outline (e.g., - (iv) bob loblaw law blog. But it would also be cool to be able to just enter-tab my way through the actual outline.

One more thing…

I also don’t know how to style my ordered list to have left and right parentheses (e.g., (a) blah blah) as opposed to a dot (e.g., a. blah). Is this a ol::before and ::after type situation? Clearly I am out of my element when it comes to, among other things, CSS, Markdown, and their interactions.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.