From ed57b5a4794d97be5fe7b7a121bc79118a851cd4 Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Wed, 21 Feb 2024 11:33:13 +0000 Subject: [PATCH] Use EditorView.theme for the history diff viewer styles (#17156) GitOrigin-RevId: e52519b392395ed740de5932a59fe35321200d5a --- .../web/frontend/js/features/history/extensions/theme.ts | 5 +++-- .../web/frontend/stylesheets/app/editor/history-react.less | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/web/frontend/js/features/history/extensions/theme.ts b/services/web/frontend/js/features/history/extensions/theme.ts index 6dea59e191..6bf83e98ea 100644 --- a/services/web/frontend/js/features/history/extensions/theme.ts +++ b/services/web/frontend/js/features/history/extensions/theme.ts @@ -47,7 +47,7 @@ const createThemeFromOptions = ({ }), // Set variables for tooltips, which are outside the editor // TODO: set these on document.body, or a new container element for the tooltips, without using a style mod - EditorView.baseTheme({ + EditorView.theme({ '.cm-tooltip': { '--font-size': `${fontSize}px`, '--source-font-family': fontFamilyValue, @@ -56,11 +56,12 @@ const createThemeFromOptions = ({ ] } -const baseTheme = EditorView.baseTheme({ +const baseTheme = EditorView.theme({ '.cm-content': { fontSize: 'var(--font-size)', fontFamily: 'var(--source-font-family)', lineHeight: 'var(--line-height)', + color: '#000', }, '.cm-gutters': { fontSize: 'var(--font-size)', diff --git a/services/web/frontend/stylesheets/app/editor/history-react.less b/services/web/frontend/stylesheets/app/editor/history-react.less index 4dd8a8cb7b..4c828f7500 100644 --- a/services/web/frontend/stylesheets/app/editor/history-react.less +++ b/services/web/frontend/stylesheets/app/editor/history-react.less @@ -392,7 +392,6 @@ history-root { display: flex; flex-direction: column; position: relative; - color: #000; .cm-viewer-container, .cm-editor {