Revealjs: code block at the end of a callout lost its bottom spacing since 1.8.15
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 72/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- html, scss
- Ambito
- frontend
Direzione di ricerca
Le due regole si trovano in src/resources/formats/revealjs/quarto.scss, intorno alle righe 919-926 e 975-977, e corrispondono all'ultimo div.sourceCode ma non al wrapper div.code-copy-outer-scaffold aggiunto dal postprocessore HTML (vedi src/format/reveal/format-reveal.ts intorno alla riga 260). Genera una presentazione revealjs con un callout che termina con un blocco di codice, poi controlla nel browser lo spazio sotto il codice. Il lavoro è completato quando entrambi i selettori corrispondono anche allo scaffold come ultimo figlio e la spaziatura corrisponde a quella della 1.7.34 per entrambi i tipi di callout.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
In Revealjs, when a code block is the last element of a callout, it now sits against the bottom of the callout. With appearance="simple" and no title, the code block border touches the callout border.
Gap between the bottom of the code block and the bottom of the callout, measured with Chromium on the example below:
| Callout | 1.7.34 | main |
|---|---|---|
| Default, titled, ending with code | 12.03px | 8.33px |
| Simple, untitled, ending with code | 15.74px | 0.93px |
The 0.93px is only the 1px callout border. Callouts ending with a paragraph render the same in both versions.
#13024 is first released in 1.8.15, so I expect the change to start there. I only rendered with 1.7.34 and main, not with 1.8.14 or 1.8.15.
Reproducible example
---
title: Callout last child code
format: revealjs
---
## Titled ending with code
::: {.callout-note}
## Titled
Some text.
```python
x = 1
```
:::
## Simple untitled ending with code
::: {.callout-note appearance="simple"}
Some text.
```python
x = 1
```
:::
What happens
Since #13024, the HTML postprocessor wraps code blocks in a div.code-copy-outer-scaffold for the copy button. Revealjs uses the same postprocessor with copyCode: true:
So the last child of .callout-content is now the scaffold div and not div.sourceCode. Two rules added in #11251 to handle a code block in last position no longer match.
For simple untitled callouts, #11251 added a margin below a last div.sourceCode so that the code border does not merge with the callout border. This rule never matches now, which is the visible part:
For titled callouts, the last child gets padding-bottom: 0.5rem and no margin, except when it is a div.sourceCode, which keeps the var(--r-block-margin) margin. This exclusion was there to avoid the duplicated background color on a code block in last position. The scaffold is not excluded, so it gets the 8px padding instead of the 12px margin. This one is more cosmetic.
We could make both selectors also target div.code-copy-outer-scaffold when it is the last child.
Related: #13446 and #13238 are about the same scaffold change on HTML callouts, which use different rules in the Bootstrap stylesheets.
- Lingua principale
- JavaScript
- Stelle
- 6.1k
- Fork
- 463
- Merge medio
- 21h 53m
- PR unite (30g)
- 58
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di quarto-dev/quarto-cli
-
Website navbar hides the notebook preview headerForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaaccessibility bug embed websites
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
quarto-dev/quarto-cli#14972 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
accessibility documentation revealjs
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
quarto-dev/quarto-cli#14971 ·
I maintainer di solito rispondono entro 1 giorno
-
accessibility revealjs
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
quarto-dev/quarto-cli#14970 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
a11y: notebook preview header is outside any landmarkForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaaccessibility embed
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
quarto-dev/quarto-cli#14968 ·
I maintainer di solito rispondono entro 1 giorno
-
accessibility revealjs themes
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
quarto-dev/quarto-cli#14963 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di quarto-dev/quarto-cli
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
no-human-ai/no_human#659 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] Multi-day events show "Ended" while still in progressForse già presa @tarunagnihotri534 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
data-umbrella/du-event-board#231 · 2 commenti ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
-
IO.get_env on Node truncates names at embedded NULForse già presa @Yi-111-a l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
HigherOrderCO/Bend#1449 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
cryptpad/documentation#162 ·