From 505f7a53ffd4e43c19ea97b16584c07aade326cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89mile=20R=C3=A9?= Date: Wed, 17 Jun 2026 17:40:57 +0200 Subject: [PATCH] Add base text-rendering layer to v2 theme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply font smoothing (antialiased / grayscale) and overflow-wrap on the document base, mirroring the root defaults Radix Themes sets. Placed in @layer base so any utility can override it. The body font is left to Tailwind's preflight, which already applies --font-sans. Signed-off-by: Émile Ré --- packages/ui/src/v2/theme/typography.css | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/packages/ui/src/v2/theme/typography.css b/packages/ui/src/v2/theme/typography.css index 231fd494e..693601847 100644 --- a/packages/ui/src/v2/theme/typography.css +++ b/packages/ui/src/v2/theme/typography.css @@ -94,3 +94,21 @@ --font-weight-medium: 500; --font-weight-bold: 700; } + +/* --------------------------------------------------------------------------- + * Base text rendering + * + * Global polish mirroring Radix's root defaults. The body font itself is not + * set here: Tailwind's preflight already applies var(--font-sans) (→ Inter) + * via --default-font-family, so it inherits automatically. + * ------------------------------------------------------------------------- */ +@layer base { + html { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + + body { + overflow-wrap: break-word; + } +}