quarto-dev / quarto-dev/quarto-cli
Inconsistent margins when lists appear inside blockquotes
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
When a bulleted or numbered list using extra paragraph spacing is placed inside of a blockquote, the bottom margins are inconsistent.
The behavior is even more inconsistent with nested lists (i.e. outlines) but the reproduction case below doesn't demonstrate that.
As a workaround, I have added the following block to my document:
<style>
/* Override the default theme's misbehaving rule */
blockquote p:last-child, blockquote ul:last-child, blockquote ol:last-child {
margin-bottom: 1rem !important;
}
/* Define a new rule that's closer to being correct */
blockquote > p:last-child, blockquote > ul:last-child, blockquote > ol:last-child {
margin-bottom: 0 !important;
}
</style>
This isn't perfect, because the bottom margin of the quoted list is still too tall.
(NB: I'm a Posit employee, feel free to ping me on Slack if you need something.)
Steps to reproduce
The following document shows a numbered list that requests extra paragraph spacing both outside of a blockquote and inside of a blockquote:
---
title: 'Blockquote Test'
format: html
engine: pandoc
---
1. Foo
2. Bar
3. Baz
> 1. Foo
>
> 2. Bar
>
> 3. Baz
Actual behavior
The resulting document has different margins for the list outside of the blockquote compared to the list inside of the blockquote:
Expected behavior
The resulting document formats the quoted list the same as the unquoted list:
(Note that the bottom margin is too large in this screenshot because my workaround isn't perfect.)
Your environment
- Using quarto-cli 1.18.7 standalone (no IDE)
- OS: Arch Linux
Quarto check output
Quarto 1.8.17
[✓] Checking environment information...
Quarto cache location: /home/coda/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.6.3: OK
Dart Sass version 1.87.0: OK
Deno version 2.3.1: OK
Typst version 0.13.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.8.17
Path: /opt/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /usr/bin
Version: undefined
[✓] Checking Chrome Headless....................OK
Using: Chrome found on system
Path: /home/coda/bin/google-chrome
Source: PATH
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.13.5
Path: /usr/bin/python3
Jupyter: 5.8.1
Kernels: python3
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.5.1
Path: /usr/lib64/R
LibPaths:
- /home/coda/R/x86_64-pc-linux-gnu-library/4.5
- /usr/lib/R/library
knitr: 1.50
rmarkdown: 2.29
[✓] Checking Knitr engine render......OK
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied Quarto .qmd reproduction and render it to HTML using the Quarto CLI. Compare the list margins outside and inside the blockquote, including the nested-list behavior mentioned in the report. Done means quoted lists use the same intended spacing as unquoted lists without the workaround CSS.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, html, markdown
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100