fix themes.

This commit is contained in:
2023-04-12 08:41:59 +08:00
parent efc9413ce6
commit 42e2616f35
3 changed files with 4 additions and 20 deletions

View File

@@ -60,6 +60,8 @@ interface Settings {
* Text color inside gutter. * Text color inside gutter.
*/ */
gutterForeground: string gutterForeground: string
gutterBorderRight: string
} }
export const createTheme = ({ export const createTheme = ({
@@ -89,6 +91,7 @@ export const createTheme = ({
}, },
".cm-gutters": { ".cm-gutters": {
backgroundColor: settings.gutterBackground, backgroundColor: settings.gutterBackground,
borderRight: settings.gutterBorderRight,
color: settings.gutterForeground, color: settings.gutterForeground,
}, },
".cm-activeLineGutter": { ".cm-activeLineGutter": {

View File

@@ -22,26 +22,6 @@ const chalky = "#e5c07b",
selection = "#3E4451", selection = "#3E4451",
cursor = "#528bff" cursor = "#528bff"
/// The colors used in the theme, as CSS color strings.
const color = {
chalky,
coral,
cyan,
invalid,
ivory,
stone,
malibu,
sage,
whiskey,
violet,
darkBackground,
highlightBackground,
background,
tooltipBackground,
selection,
cursor,
}
/// The editor theme styles for One Dark. /// The editor theme styles for One Dark.
const oneDarkTheme = EditorView.theme( const oneDarkTheme = EditorView.theme(
{ {

View File

@@ -11,6 +11,7 @@ export const smoothy = createTheme({
selection: "#FFFD0054", selection: "#FFFD0054",
gutterBackground: "#FFFFFF", gutterBackground: "#FFFFFF",
gutterForeground: "#00000070", gutterForeground: "#00000070",
gutterBorderRight: "none",
lineHighlight: "#00000008", lineHighlight: "#00000008",
}, },
styles: [ styles: [