Skip to content

fix editor punctuation width - #297741

Merged
Alexandru Dima (alexdima) merged 2 commits into
microsoft:mainfrom
neruthes:patch-1
Feb 28, 2026
Merged

Alexandru Dima (alexdima) merged 2 commits into
microsoft:mainfrom
neruthes:patch-1

Conversation

@neruthes

Copy link
Copy Markdown
Contributor

Close #242138

This PR adds a simple one-line text-spacing-trim: space-all; for .monaco-editor.

Investigations showed that the issue was not introduced by an active change in this repository; instead, it might come from an upstream change of default value. So I am not creating a PR for a new setting entry.

Inserting `text-spacing-trim: space-all;` for `.monaco-editor`

@alexdima Alexandru Dima (alexdima) left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Notes for myself:
image

Was space-all the default? No. The initial/default value is normal, not space-all. The formal definition table states: Initial value: normal. The normal value applies kerning/trimming rules to CJK punctuation — collapsing spacing between adjacent punctuation, and adjusting punctuation at line starts/ends. space-all is the opt-out value that leaves all CJK full-width punctuation at full width (no trimming).

You might be thinking of the behavior before browsers implemented text-spacing-trim — when no browser supported it, the effective behavior was equivalent to space-all (no punctuation trimming happened). So in practice, space-all matches what users historically saw, but it was never the spec default.

Is space-all more appropriate for a code editor? Yes, very likely. In a code editor:

@alexdima
Alexandru Dima (alexdima) merged commit c7d2d62 into microsoft:main Feb 28, 2026
18 checks passed
Don Jayamanne (DonJayamanne) pushed a commit that referenced this pull request Mar 2, 2026
Inserting `text-spacing-trim: space-all;` for `.monaco-editor`
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Apr 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bring good old full width punctuations back

3 participants