From c3254740472744d4ddbefd577d3095fef5a6d9dd Mon Sep 17 00:00:00 2001 From: xrkffgg Date: Wed, 8 Feb 2023 10:34:06 +0800 Subject: [PATCH] style: rename fontFamilyCode (#40622) * style: rename fontFamilyCode * Update seed.ts * Update mixins.ts --- components/theme/interface/seeds.ts | 2 +- components/theme/themes/seed.ts | 2 +- components/typography/style/mixins.ts | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/theme/interface/seeds.ts b/components/theme/interface/seeds.ts index c695c6b77f..27ebd46b70 100644 --- a/components/theme/interface/seeds.ts +++ b/components/theme/interface/seeds.ts @@ -77,7 +77,7 @@ export interface SeedToken extends PresetColorType { * @nameEN Font family for code text * @desc 代码字体,用于 Typography 内的 code、pre 和 kbd 类型的元素 */ - codeFontFamily: string; + fontFamilyCode: string; /** * @nameZH 默认字号 diff --git a/components/theme/themes/seed.ts b/components/theme/themes/seed.ts index 3f6fc500f1..70e9f2c73d 100644 --- a/components/theme/themes/seed.ts +++ b/components/theme/themes/seed.ts @@ -34,7 +34,7 @@ const seedToken: SeedToken = { fontFamily: `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'`, - codeFontFamily: `'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace`, + fontFamilyCode: `'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace`, fontSize: 14, // Line diff --git a/components/typography/style/mixins.ts b/components/typography/style/mixins.ts index bb3271e6d7..7ae66adbe5 100644 --- a/components/typography/style/mixins.ts +++ b/components/typography/style/mixins.ts @@ -89,7 +89,7 @@ export const getResetStyles: GenerateStyle = (token) paddingInline: '0.4em', paddingBlock: '0.2em 0.1em', fontSize: '85%', - fontFamily: token.codeFontFamily, + fontFamily: token.fontFamilyCode, background: 'rgba(150, 150, 150, 0.1)', border: '1px solid rgba(100, 100, 100, 0.2)', borderRadius: 3, @@ -100,7 +100,7 @@ export const getResetStyles: GenerateStyle = (token) paddingInline: '0.4em', paddingBlock: '0.15em 0.1em', fontSize: '90%', - fontFamily: token.codeFontFamily, + fontFamily: token.fontFamilyCode, background: 'rgba(150, 150, 150, 0.06)', border: '1px solid rgba(100, 100, 100, 0.2)', borderBottomWidth: 2, @@ -164,7 +164,7 @@ export const getResetStyles: GenerateStyle = (token) background: 'rgba(150, 150, 150, 0.1)', border: '1px solid rgba(100, 100, 100, 0.2)', borderRadius: 3, - fontFamily: token.codeFontFamily, + fontFamily: token.fontFamilyCode, // Compatible for marked code: {