Skip to content

fix(kimi-web): disable text hyphenation and code ligatures - #1438

Merged
wbxl2000 merged 1 commit into
mainfrom
fix/web-text-rendering
Jul 6, 2026
Merged

fix(kimi-web): disable text hyphenation and code ligatures#1438
wbxl2000 merged 1 commit into
mainfrom
fix/web-text-rendering

Conversation

@wbxl2000

@wbxl2000 wbxl2000 commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue — small text-rendering polish for the web UI.

Problem

  • The web UI is lang="en" and had no explicit guard against automatic text hyphenation, so chat/markdown prose could gain a hyphen glyph at line breaks.
  • Code is rendered in JetBrains Mono, which enables ligatures by default, so sequences like !=, =>, -> collapse into a single glyph (, , ) instead of rendering literally.

What changed

In apps/kimi-web/src/style.css:

  • Set hyphens: none (with the -webkit- prefix) on body. Inherited, so it covers chat and markdown everywhere; components still decide where lines wrap via word-break/overflow-wrap.
  • Disable font ligatures on native code elements (code, pre, kbd, samp, tt) via font-feature-settings: "liga" 0, "calt" 0, "ss01" 0 plus font-variant-ligatures: none, so code renders literally.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works. (CSS-only change; kimi-web has no component/render tests, so ran pnpm --filter @moonshot-ai/kimi-web check:style instead.)
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update. (Internal CSS-only change; no user-facing docs to update.)

@changeset-bot

changeset-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5b0263c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Set hyphens: none (with the -webkit- prefix) on body so chat and markdown text never gain a hyphen glyph at a line break; components still control where lines wrap via word-break/overflow-wrap.

Disable the ligatures that coding fonts enable by default (liga/calt/ss01) on native code elements so code renders literally, e.g. != stays as two characters.
@wbxl2000
wbxl2000 force-pushed the fix/web-text-rendering branch from 32dab28 to 5b0263c Compare July 6, 2026 14:02
@wbxl2000 wbxl2000 changed the title feat(kimi-web): disable text hyphenation and add ligature-free mono style fix(kimi-web): disable text hyphenation and code ligatures Jul 6, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 6, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@5b0263c
npx https://pkg.pr.new/@moonshot-ai/kimi-code@5b0263c

commit: 5b0263c

@wbxl2000
wbxl2000 merged commit d86fa38 into main Jul 6, 2026
11 checks passed
@wbxl2000
wbxl2000 deleted the fix/web-text-rendering branch July 6, 2026 14:12
This was referenced Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant