I think the CSS rules in the following lines, which are applied on website pages with the title block banned enabled, are either missing a `>` combinator or one of the `:first-of-type` should be a `:first-child` selector.

https://github.com/quarto-dev/quarto-cli/blob/0f622d36eee8b4998dbe8c17bf59abd8b229d0e1/src/resources/formats/html/templates/title-block.scss#L83-L87

What I've noticed is that the `margin-top: 0` rule is being applied to all `h2`, `h3` and `h4` that are the first in their section — so every `h3` under an `h2` anywhere on the page has top margin of zero. That doesn't seem intentional.

You can see it in Tom Mock's blog in [the _Add description and wrap_ section of this post](https://themockup.blog/posts/2022-11-08-use-r-to-generate-a-quarto-blogpost/#add-description-and-wrap) (it's the first `<h3>` under section created by an `<h2>`.

![image](https://user-images.githubusercontent.com/5420529/217548367-969c4d64-f99b-4cab-b395-cc2e1f4da8e5.png)

dragonstyle
2023-02-08T13:51:48Z
gadenbuie
v1.3
closed
Website title block banner heading margin applied throughout post
https://github.com/quarto-dev/quarto-cli/issues/4279