From 078a3b8d0592f0af1ea1f75f244c749477ad9e5c Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Wed, 27 Nov 2024 09:41:02 +0000 Subject: [PATCH] Use `--font-sans` in the Visual Editor widgets (#22085) GitOrigin-RevId: 64a480562b3e7d2fda7d41ed402511290f800f14 --- .../features/source-editor/extensions/visual/pasted-content.tsx | 2 +- .../js/features/source-editor/extensions/visual/visual-theme.ts | 2 +- .../stylesheets/bootstrap-5/foundations/typography.scss | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/services/web/frontend/js/features/source-editor/extensions/visual/pasted-content.tsx b/services/web/frontend/js/features/source-editor/extensions/visual/pasted-content.tsx index 754f23e3ec..3cb669d927 100644 --- a/services/web/frontend/js/features/source-editor/extensions/visual/pasted-content.tsx +++ b/services/web/frontend/js/features/source-editor/extensions/visual/pasted-content.tsx @@ -81,7 +81,7 @@ const pastedContentTheme = EditorView.baseTheme({ flexDirection: 'column', boxSizing: 'border-box', fontSize: '14px', - fontFamily: '"Lato", sans-serif', + fontFamily: 'var(--font-sans)', }, '.ol-cm-pasted-content-menu-item': { color: 'inherit', diff --git a/services/web/frontend/js/features/source-editor/extensions/visual/visual-theme.ts b/services/web/frontend/js/features/source-editor/extensions/visual/visual-theme.ts index 947525022f..357bb99248 100644 --- a/services/web/frontend/js/features/source-editor/extensions/visual/visual-theme.ts +++ b/services/web/frontend/js/features/source-editor/extensions/visual/visual-theme.ts @@ -366,7 +366,7 @@ const mainVisualTheme = EditorView.theme({ '.ol-cm-preamble-widget, .ol-cm-end-document-widget': { padding: '0.25em 1em', borderRadius: '8px', - fontFamily: '"Lato", sans-serif', + fontFamily: 'var(--font-sans)', fontSize: '14px', '.ol-cm-preamble-expanded &': { borderBottomLeftRadius: '0', diff --git a/services/web/frontend/stylesheets/bootstrap-5/foundations/typography.scss b/services/web/frontend/stylesheets/bootstrap-5/foundations/typography.scss index b078516b5c..27d4578562 100644 --- a/services/web/frontend/stylesheets/bootstrap-5/foundations/typography.scss +++ b/services/web/frontend/stylesheets/bootstrap-5/foundations/typography.scss @@ -1,6 +1,7 @@ // This file provides CSS variables for font size and line height, plus Sass variables for base text size for Bootstrap :root { + --font-sans: 'Noto Sans', sans-serif; --font-size-01: 0.75rem; // 12px --font-size-02: 0.875rem; // 14px --font-size-03: 1rem; // 16px