Revealjs: code block at the end of a callout lost its bottom spacing since 1.8.15
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- html, scss
- 領域
- frontend
調査の方向性
2つのルールは src/resources/formats/revealjs/quarto.scss の919~926行目および975~977行目付近にあり、末尾の div.sourceCode にはマッチしますが、HTML後処理によって追加される div.code-copy-outer-scaffold ラッパーにはマッチしません(src/format/reveal/format-reveal.ts の260行目付近を参照)。コードブロックで終わるcalloutを含むrevealjsスライドをレンダリングし、ブラウザでコードの下の余白を確認してください。両方のセレクタが scaffold を最後の子要素としてもマッチし、両方のcalloutタイプの余白が1.7.34と一致すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- JavaScript
- スター
- 6.1k
- フォーク
- 463
- 平均マージ
- 21時間 14分
- マージ済み PR(30日)
- 60
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
quarto-dev/quarto-cli のほかの issue
-
Website navbar hides the notebook preview header対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンaccessibility bug embed websites
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
quarto-dev/quarto-cli#14972 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
accessibility documentation revealjs
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
quarto-dev/quarto-cli#14971 ·
メンテナーはふだん 1 日以内に返信
-
accessibility revealjs
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
quarto-dev/quarto-cli#14970 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
a11y: notebook preview header is outside any landmark対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンaccessibility embed
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
quarto-dev/quarto-cli#14968 ·
メンテナーはふだん 1 日以内に返信
-
accessibility revealjs themes
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
quarto-dev/quarto-cli#14963 ·
メンテナーはふだん 1 日以内に返信
quarto-dev/quarto-cli の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
jspreadsheet/ce#1809 ·
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
githubnext/gh-aw-workshop#4458 ·
メンテナーはふだん 1 日以内に返信
-
Add: Cartoonitoオープンcheck:failed feeds:add
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
iptv-org/database#37390 · コメント 1 件 ·
メンテナーはふだん 9 日以内に返信
-
bug: directory index route root priority is overwritten when wildcard is false対応中かも @TalhaHunter101 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
fastify/fastify-static#617 ·
-
bug confirmed css v6
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信