Is it possible to target just the first paragraph after a header? The following code works to change the first letter of each paragraph to a different style, but I would like to just change the first paragraph, not any successive ones.
The reason why it’s not working with direct selectors like h1 + p is because Obsidian wraps the H and P tags inside DIV tags, so you have to target their parent DIV tags instead based on what kind of children tags they have.
So it’s a bit more lengthy but definitely possible (I also refactored your code since it was redundant and also made it clearer by grouping related properties):
P.S. if you don’t want to lose your sanity while doing CSS styling, try using shorthand properties where possible, group related properties together and get rid of redundant ones like “padding-left/right” that can be replaced with “padding-inline”, or “-top/-bottom” with “-block”, similarly with margins, etc. (or even a short form padding: 3px for all sides at once)