Skip to content

Commit 31592d5

Browse files
authored
fix: no text auto-sizing on webkit (#1186)
That ensures that no line is displayed with a bigger font-size due to its length. see https://bugs.webkit.org/show_bug.cgi?id=304640 Fixes #1101
1 parent 2e611c1 commit 31592d5

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

formatters/html/html.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@ func (f *Formatter) styleToCSS(style *chroma.Style) map[chroma.TokenType]string
528528
}
529529
classes[chroma.Background] += `;` + f.tabWidthStyle()
530530
classes[chroma.PreWrapper] += classes[chroma.Background]
531+
classes[chroma.PreWrapper] += ` -webkit-text-size-adjust: none;`
531532
// Make PreWrapper a grid to show highlight style with full width.
532533
if len(f.highlightRanges) > 0 && f.customCSS[chroma.PreWrapper] == `` {
533534
classes[chroma.PreWrapper] += `display: grid;`

0 commit comments

Comments
 (0)