@Deinos@Olondre my response would be a bit incomplete (bcoz I don’t have access to my pc for few days to test) but it will give the potential solution approach.
Btw first-of-type works for first of element (either H2/H3 or p or ul) but not classes and valid within same parent.
So since in LP .HyperMD-header-2 is a div, if u don’t have it as first one of the notes line it won’t be detected as first. For Reading view, almost everything is wrapped by its own container div unless it’s the very next line, so that almost cannot work.
The solution is likely to use sibling selector i.e. HyperMD-header-2 ~ HyperMD-header-2 in LP to select all H2 other than first.
For Reading View .markdown-preview-section div:has(h2) ~ div:has(h2) h2. This one, in general is the approach but it might miss something
This is fantastic. Thanks for your clear explanation, lots to learn here.
Your examples both work flawlessly as far as I can tell.
So @Deinos, this css snippet would for instance colour all your h2 headers except the first:
Thanks efemkay and Olondre! The approach definitely works for the Live Preview / Source Mode, which is the real impetus for my request. The Reading Mode snippet doesn’t seem to pick up any instances of the H2 in my notes. But for my own purposes, I don’t really use RM.
I appreciate the help and the explanation. I want to up my game in css so this has been beneficial in more ways than the immediate application. Cheers!