Skip to content

Commit

Permalink
chore: update editor style (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanglbme committed Sep 10, 2024
1 parent 4630fe7 commit 9922f5d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 150 deletions.
138 changes: 0 additions & 138 deletions src/assets/less/style-mirror.less

This file was deleted.

16 changes: 8 additions & 8 deletions src/assets/less/theme.less
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,7 @@
}
}

.cm-s-style-mirror .CodeMirror-matchingbracket {
color: @nightWhiteColor !important;
background: rgb(30, 30, 30) !important;
}

.cm-s-xq-light span.cm-variable-2,
.cm-s-style-mirror span.cm-tag {
color: @nightFontColor;
}

.cm-s-xq-light .CodeMirror-activeline-background {
background-color: transparent;
Expand Down Expand Up @@ -103,3 +95,11 @@
padding-bottom: 20px;
box-sizing: border-box;
}

.cm-em {
font-style: normal;
}

.cm-comment {
font-style: normal !important;
}
1 change: 0 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import 'codemirror/theme/xq-light.css'
/* 每个页面公共css */
import '@/assets/index.css'
import '@/assets/less/theme.less'
import '@/assets/less/style-mirror.less'

import 'codemirror/mode/css/css'
import 'codemirror/mode/markdown/markdown'
Expand Down
3 changes: 2 additions & 1 deletion src/stores/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,9 @@ export const useStore = defineStore(`store`, () => {
cssEditor.value = markRaw(
CodeMirror.fromTextArea(cssEditorDom, {
mode: `css`,
theme: `style-mirror`,
theme: `xq-light`,
lineNumbers: false,
styleActiveLine: true,
lineWrapping: true,
matchBrackets: true,
autofocus: true,
Expand Down
2 changes: 0 additions & 2 deletions src/views/CodemirrorEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ import {
toBase64,
} from '@/utils'
import 'codemirror/mode/javascript/javascript'
const store = useStore()
const { output, editor, editorContent, isShowCssEditor } = storeToRefs(store)
Expand Down

0 comments on commit 9922f5d

Please sign in to comment.