diff --git a/news/changelog-1.3.md b/news/changelog-1.3.md index b8cb9b5e6d8..cd47b761591 100644 --- a/news/changelog-1.3.md +++ b/news/changelog-1.3.md @@ -33,6 +33,7 @@ - reduce font size of `df-print: paged` tables ([#3380](https://github.com/quarto-dev/quarto-cli/issues/3380)) - `width` and `height` in percent are now correctly supported ([#4063](https://github.com/quarto-dev/quarto-cli/issues/4063)) +- add better margins to numbered lists in the presence of many items and `.scrollable` ([#4283](https://github.com/quarto-dev/quarto-cli/issues/4063)). ## Dates diff --git a/src/resources/formats/revealjs/quarto.scss b/src/resources/formats/revealjs/quarto.scss index 4b734d9a1c0..ab5680e46da 100644 --- a/src/resources/formats/revealjs/quarto.scss +++ b/src/resources/formats/revealjs/quarto.scss @@ -661,3 +661,18 @@ div.cell-output-display div.pagedtable-wrapper table.table { margin-left: 0.25em; } } + +/* + + https://github.com/quarto-dev/quarto-cli/issues/4283 + + The trick itself is from here: + + https://stackoverflow.com/questions/8720931/can-css-detect-the-number-of-children-an-element-has + +*/ + +.reveal .scrollable ol li:first-child:nth-last-child(n + 10), +.reveal .scrollable ol li:first-child:nth-last-child(n + 10) ~ li { + margin-left: 1em; +}