Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Visual editor: body text font shrinks after toggling outline (Ctrl+Alt+O) and stays shrunk

オープン
#1,113 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
css, typescript
領域
frontend

調査の方向性

Start in the visual editor's theme CSS generator and inspect how the ProseMirror font-size decoration is applied during outline-triggered re-renders. Reproduce the toggle with a configured font size and verify the body font remains unchanged afterward while code blocks remain unaffected. Done means the configured body text size survives opening and closing the outline without reloading the document.

索引モデルが issue の本文から書いたものです。

説明

visual-editor
Description

In the Quarto visual editor, opening the outline (Ctrl+Alt+O / Show Outline) shrinks the body text font and it stays shrunk after closing the outline. Code blocks are unaffected.

Environment
  • Positron 1.130.0 (VS Code / Code OSS derivative) on Windows 11
  • Quarto extension: 1.136.0 and 1.137.0 (both reproduce)
  • Setting: quarto.visualEditor.fontSize: 20 (pt rendering ~21.33px)
Steps to reproduce
  1. Open any .qmd document in the Quarto visual editor (body text renders at the configured 16pt/20px).
  2. Open the outline panel (Ctrl+Alt+O or Show Outline button).
  3. Observe: body text shrinks to ~14px (14.4px = body {0.9rem} × 16px inherited).
  4. Close the outline: font stays shrunk (does not recover until document reload / source↔visual toggle).

Code cells (.pm-fixedwidth-font) keep their size in every step.

Root cause (instrumented, confirmed on 1.136.0/1.137.0)

Toggling the outline triggers a re-render of the editor; during that re-render the ProseMirror decoration that applies the .pm-proportional-font class to the body is lost. The CSS rule still exists, but the class is no longer on the element, so body text falls back to the inherited font size (~14px). Code blocks use the independent .pm-fixedwidth-font class which is not dropped, which is why only body text shrinks.

Evidence from a DOM probe around the toggle:

  • before: .pm-proportional-font present, computed font-size 21.33px
  • after: .pm-proportional-font count = 0, computed font-size 14px (CSS rule unchanged)
Expected behavior

Body text font size must not depend on a decoration class surviving re-renders. After toggling the outline (or any layout-affecting UI state change) the font-size decoration should be re-applied, or the proportional font should be styled on a stable element (e.g. the ProseMirror root).

Local workaround (what we ship)

Patch the theme CSS generator so the rule targets the editor root as well:

.pm-proportional-font, .ProseMirror {
  font-family: ${x.proportionalFont} !important;
  font-size: ${x.proportionalFontSizePt}pt !important;
}

This keeps body text at the configured size even when the class is dropped. It works, but it is a stopgap; the decoration-loss bug itself should be fixed upstream.

主要言語
TypeScript
スター
652
フォーク
64
平均マージ
8時間 45分
マージ済み PR(30日)
36

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

quarto-dev/quarto のほかの issue

quarto-dev/quarto の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。