Mobile: Make editor styles closer to desktop (#10377)

pull/10383/head
Henry Heino 2024-04-27 03:43:37 -07:00 committed by GitHub
parent 03617eb8a7
commit 1bb3632a70
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 4 deletions

View File

@ -147,7 +147,7 @@ const createTheme = (theme: EditorTheme): Extension[] => {
borderColor: theme.colorFaded, borderColor: theme.colorFaded,
backgroundColor: 'rgba(155, 155, 155, 0.1)', backgroundColor: 'rgba(155, 155, 155, 0.1)',
...(theme.isDesktop ? monospaceStyle : {}), ...monospaceStyle,
}, },
// CodeMirror wraps the existing inline span in an additional element. // CodeMirror wraps the existing inline span in an additional element.
@ -161,7 +161,7 @@ const createTheme = (theme: EditorTheme): Extension[] => {
borderColor: isDarkTheme ? 'rgba(200, 200, 200, 0.5)' : 'rgba(100, 100, 100, 0.5)', borderColor: isDarkTheme ? 'rgba(200, 200, 200, 0.5)' : 'rgba(100, 100, 100, 0.5)',
borderRadius: '4px', borderRadius: '4px',
...(theme.isDesktop ? monospaceStyle : {}), ...monospaceStyle,
}, },
'& .cm-mathBlock, & .cm-inlineMath': { '& .cm-mathBlock, & .cm-inlineMath': {
@ -182,7 +182,7 @@ const createTheme = (theme: EditorTheme): Extension[] => {
// Override the default URL style when the URL is within a link // Override the default URL style when the URL is within a link
'& .tok-url.tok-link, & .tok-link.tok-meta, & .tok-link.tok-string': { '& .tok-url.tok-link, & .tok-link.tok-meta, & .tok-link.tok-string': {
opacity: theme.isDesktop ? 0.6 : 1, opacity: 0.6,
}, },
// Applying font size changes with CSS rather than the theme below works // Applying font size changes with CSS rather than the theme below works
@ -244,7 +244,6 @@ const createTheme = (theme: EditorTheme): Extension[] => {
{ {
tag: tags.link, tag: tags.link,
color: theme.urlColor, color: theme.urlColor,
textDecoration: theme.isDesktop ? undefined : 'underline',
}, },
{ {
tag: [mathTag, inlineMathTag], tag: [mathTag, inlineMathTag],