mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-25 02:00:10 +02:00
Merge pull request #27953 from overleaf/mj-editor-color-scheme
[web] Specify CSS color-scheme based on editor theme GitOrigin-RevId: dda4039b7fcc4aecc7ed3f96efe15518599c9226
This commit is contained in:
committed by
Copybot
parent
fc5ae92be1
commit
33dbfe4c6f
@@ -45,7 +45,13 @@ const createThemeFromOptions = ({
|
||||
]
|
||||
}
|
||||
|
||||
const baseTheme = EditorView.theme({
|
||||
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)',
|
||||
|
||||
@@ -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)',
|
||||
|
||||
Reference in New Issue
Block a user