From fe0d7417af1bdfe59b48c2260fcd015fd241c35e Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Tue, 7 Jan 2025 19:21:39 +0530 Subject: [PATCH] C --- web/packages/shared/themes/components.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/packages/shared/themes/components.ts b/web/packages/shared/themes/components.ts index e2d23f3fd5..06a329004b 100644 --- a/web/packages/shared/themes/components.ts +++ b/web/packages/shared/themes/components.ts @@ -10,6 +10,10 @@ export const getComponents = ( styleOverrides: { body: { fontFamily: typography.fontFamily, + // MUI has different letter spacing for each variant, but those + // are values arrived at for the default Material font, and + // don't work for the font that we're using, so reset it to a + // reasonable value that works for our font. letterSpacing: "-0.011em", }, strong: { fontWeight: 700 }, @@ -18,7 +22,12 @@ export const getComponents = ( MuiTypography: { defaultProps: { + // MUI has body1 as the default variant for Typography, but our + // variant scheme is different, instead of body1/2, we have + // large/body/small etc. So reset the default to our equivalent of + // body1, which is "body". variant: "body", + // Map all our custom variants to

. variantMapping: { large: "p", body: "p",