Visual editor: body text font shrinks after toggling outline (Ctrl+Alt+O) and stays shrunk
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 72/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- css, typescript
- Ambito
- frontend
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Open any
.qmddocument in the Quarto visual editor (body text renders at the configured 16pt/20px). - Open the outline panel (
Ctrl+Alt+Oor Show Outline button). - Observe: body text shrinks to ~14px (14.4px =
body {0.9rem}× 16px inherited). - 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-fontpresent, computed font-size 21.33px - after:
.pm-proportional-fontcount = 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.
- Lingua principale
- TypeScript
- Stelle
- 652
- Fork
- 64
- Merge medio
- 8h 45m
- PR unite (30g)
- 36
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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
-
VS Code extension: `quarto preview` fails when the file path contains parentheses (path not shell-quoted)Forse già presa @Bondrewd-K l’ha presa 5 giorni fa. Apertabug vscode
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
quarto-dev/quarto#1194 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
quarto-dev/quarto#1139 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 90/100
quarto-dev/quarto#1138 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
quarto-dev/quarto#1137 ·
I maintainer di solito rispondono entro 1 giorno
-
Add dependabot?Forse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
quarto-dev/quarto#1135 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di quarto-dev/quarto
Issue simili
-
Admin search throws for permissions added through Admin.generalIndexItems('permissions', ...)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Koenkk/zigbee-herdsman-converters#13540 ·
I maintainer di solito rispondono entro 1 giorno
-
Add: Tequila Music TV RO SDApertacheck:passed streams:add
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
iptv-org/iptv#55821 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area/busola/ux
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
kyma-project/busola#5442 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
vercel-labs/wterm#246 ·
I maintainer di solito rispondono entro 1 giorno