### Bug description


With this .quarto.yml file:

```yaml
project:
  type: website

website:
  title: "blog"
  sidebar:
    style: docked

format:
  html:
    theme:
      - default
```

This index.qmd file:

````md
---
title: test quarto docked sidebar with margin notes
date: 2023-02-25T21:14:15-0500
---

## title for toc

[Here's a aside note.]{.aside}

````

renders this:

<img width="1512" alt="Screenshot 2023-03-08 at 23 28 53" src="https://user-images.githubusercontent.com/1813121/223917463-3e01b261-9e9f-4196-8b9e-830c8b6ce505.png">

But this index.qmd file:


````md
---
title: test quarto docked sidebar with margin notes
date: 2023-02-25T21:14:15-0500
---

## title for toc

<!-- [Here's a aside note.]{.aside} -->

````

renders this:

<img width="1512" alt="Screenshot 2023-03-08 at 23 29 10" src="https://user-images.githubusercontent.com/1813121/223917508-5edb516c-8dad-4cac-9b6e-8fd8f53a53a7.png">

In this particular theme, seemingly the only difference here is the horizontal rule below the header, but basically, when there is a margin note _with_ `sidebar: style: docked`, there's lots of excess space on the right, and the center body seems to be shrunk. When you remove the margin note, the layout appears to change.

With `sidebar: style: float`, adding or removing a margin note does not affect the layout.

I like the behavior of the docked sidebar, but when I write blog posts with margin notes the body shrinks.

1) It doesn't match the layout of other blog posts without margin notes
2) it makes the body smaller and makes the page longer than it would be otherwise
3) Since this doesn't happen with `sidebar: style: float`, I'm assuming this is a bug.

```
shell> quarto --version
1.3.242
```

```
Platform Info:
  OS: macOS (arm64-apple-darwin21.5.0)
  CPU: 10 × Apple M1 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, apple-m1)
  Threads: 1 on 8 virtual cores
```

### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [ ] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
dragonstyle
2023-03-09T04:37:29Z
kdheepak
bug
v1.4
closed
Odd behavior with docked sidebar and margin notes
https://github.com/quarto-dev/quarto-cli/issues/4719