fix editor punctuation width#297741
Conversation
Inserting `text-spacing-trim: space-all;` for `.monaco-editor`
There was a problem hiding this comment.
Thank you!
Was
space-allthe default? No. The initial/default value isnormal, notspace-all. The formal definition table states: Initial value:normal. Thenormalvalue applies kerning/trimming rules to CJK punctuation — collapsing spacing between adjacent punctuation, and adjusting punctuation at line starts/ends.space-allis 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 tospace-all(no punctuation trimming happened). So in practice,space-allmatches what users historically saw, but it was never the spec default.
Is
space-allmore appropriate for a code editor? Yes, very likely. In a code editor:
Inserting `text-spacing-trim: space-all;` for `.monaco-editor`

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.