Indented headings

How do I target indented headings in CSS ?

I use this for headings H1:
.cm-s-obsidian .HyperMD-header-1,
.cm-s-obsidian .HyperMD-header-2
and so on… {

It works fine, but as soon as I press tab the styling get lost.

U cannot. Indented text without another text directly above is basically a code block. Which then become a different css class.

What u want to achieve anyway? Perhaps there’s another workaround.

1 Like

Great answer.

I am using # ## ### in a not so Headings way. I use em to split up text, like this.

# Topic
Text text text..

## Sub topic
Text text text..

### Sub sup topic
And so on.. 

I want it to look like this:

# Topic
Text text text..

    ## Sub topic
    Text text text..

        ### Sub sub topic
        Text text text..

Is there another way to do this?

I am doing it with “text-indent: 1rem;” right now, but that does not catch the P text afterwards.

It’s been attempted before (see link below) but it’s quite a hack that I don’t recommend using for your main notes. Perhaps just for occasional edge cases.

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