Merge pull request #28017 from overleaf/revert-28016-revert-27953-mj-editor-color-scheme

Reinstate "[web] Specify CSS color-scheme based on editor theme"

GitOrigin-RevId: a6ac8e5a352c3c795725290584a2edfa236e2baa
This commit is contained in:
Mathias Jakobsen
2025-08-21 11:51:38 +01:00
committed by Copybot
parent 02d3e920c4
commit 63a92b53f1
2 changed files with 9 additions and 0 deletions
@@ -46,6 +46,9 @@ const createThemeFromOptions = ({
}
const baseTheme = EditorView.theme({
'&.cm-editor.cm-editor': {
colorScheme: 'light',
},
'.cm-content': {
fontSize: 'var(--font-size)',
fontFamily: 'var(--source-font-family)',
@@ -92,6 +92,12 @@ const createThemeFromOptions = ({
* Base styles that can have &dark and &light variants
*/
const baseTheme = EditorView.baseTheme({
'&light.cm-editor': {
colorScheme: 'light',
},
'&dark.cm-editor': {
colorScheme: 'dark',
},
'.cm-content': {
fontSize: 'var(--font-size)',
fontFamily: 'var(--source-font-family)',