`.column-margin` content is shown in the body column, not the right margin
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 56/100
調査の方向性
Start by reading the comments in crates/quarto-core/src/template.rs about when q2 adds fullcontent, then trace how the template emits <body>, <main>, and .column-margin for the supplied index.qmd reproduction. Compare the generated markup with the Quarto 1 examples in the issue. Done when rendering the reproduction places the margin note beside the body text and emits the expected page and margin classes.
索引モデルが issue の本文から書いたものです。
説明
This issue was written by Claude while adding q2 support to
Great Docs. The output shown comes from running each repro.
Bug description
A ::: {.column-margin} div is shown in the body column, in the flow of the text, instead of in
the right margin. The theme's CSS places .column-margin with grid-column. That only takes effect
when its parent is on the page grid, and q2 writes <main> without the page-columns page-full
classes that put it there. q2 also marks the page fullcontent, which shrinks the right margin.
According to the comments in crates/quarto-core/src/template.rs, q2 adds fullcontent when
nothing uses the right margin, and it checks only for a TOC and margin categories, not
.column-margin content.
Quarto 1 writes <main class="content page-columns page-full"> on such a page, and
no-row-height column-container on the margin div, so the body text continues beside it. It also
adds page-columns page-full to each section that holds column content.
Great Docs puts its homepage's metadata sidebar (links, authors, license) in a .column-margin div.
Under q2 it sits under the page's hero, where the body text should begin. Great Docs now adds Quarto 1's
classes in a post-render script, but only for that sidebar.
Steps to reproduce
mkdir margin && cd margin
printf 'project:\n type: website\nwebsite:\n title: Demo\n' > _quarto.yml
printf -- '---\ntitle: Margin\n---\n\nBody text.\n\n::: {.column-margin}\nMargin note.\n:::\n\nMore text.\n' > index.qmd
q2 render
grep -oE '<body[^>]*>|<main[^>]*>|<div[^>]*column-margin[^>]*>' _site/index.html
Actual behavior
With q2 0.47.0, with q2 built from main at 2355f87a2, and with the nightly
0.48.0-nightly.20261125:
<body class="fullcontent quarto-light">
<main class="content" id="quarto-document-content" tabindex="-1">
<div class="column-margin">
"Margin note." is shown between the two paragraphs, at the width of the body text.
Expected behavior
As in Quarto 1.9.37, the note is in the right margin, beside the body text:
<body class="quarto-light">
<main class="content page-columns page-full" id="quarto-document-content">
<div class="no-row-height column-margin column-container">
- 主要言語
- Rust
- スター
- 316
- フォーク
- 23
- 平均マージ
- 11時間 49分
- マージ済み PR(30日)
- 245
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
quarto-dev/q2 のほかの issue
-
Heading anchor links have no icon: AnchorJS is initialised with an empty `icon`対応中かも @cscheid が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
quarto-dev/q2#1419 ·
メンテナーはふだん 1 日以内に返信
-
bug testing windows
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
quarto-dev/q2#1346 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
quarto-dev/q2#1095 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 67/100
quarto-dev/q2#1418 ·
メンテナーはふだん 1 日以内に返信
-
bug readers-writers windows
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
quarto-dev/q2#1416 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
BurntSushi/jiff#755 ·
メンテナーはふだん 1 日以内に返信
-
After the kernel is given up on, a new import leaves "Importing…" and its Cancel on the status lineオープンbug help wanted priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
sawhorse3d/sawhorse#163 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
MartinPTielemans/ilo#4607 ·