From ed4d8f4cd90bd7005e88e1721fd43a55fdb602be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?sunsonliu=28=E5=88=98=E9=98=B3=29?= Date: Fri, 27 Sep 2024 15:36:45 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E4=BC=98=E5=8C=96=E9=85=8D=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Cherry.config.js | 10 ++++++++++ src/sass/themes/blue.scss | 7 +++++++ src/sass/themes/dark.scss | 7 +++++++ src/sass/themes/green.scss | 7 +++++++ src/sass/themes/light.scss | 7 +++++++ src/sass/themes/red.scss | 7 +++++++ src/sass/themes/violet.scss | 7 +++++++ src/sass/variable.scss | 4 ++-- types/cherry.d.ts | 10 ++++++++++ 9 files changed, 64 insertions(+), 2 deletions(-) diff --git a/src/Cherry.config.js b/src/Cherry.config.js index c3393d833..cb02f882b 100644 --- a/src/Cherry.config.js +++ b/src/Cherry.config.js @@ -323,6 +323,16 @@ const defaultConfig = { * - none 标题没有锚点 */ anchorStyle: 'default', + /** + * 是否开启严格模式 + * true:严格模式 + * # head ⭕️ valid + * #head ❌ invalid + * false:宽松模式 + * # head ⭕️ valid + * #head ⭕️ valid + */ + strict: false, }, }, }, diff --git a/src/sass/themes/blue.scss b/src/sass/themes/blue.scss index 4c4ce39cd..5552a419c 100644 --- a/src/sass/themes/blue.scss +++ b/src/sass/themes/blue.scss @@ -101,6 +101,10 @@ $mdBlockquoteBg: $VIOLET1; } } } + /** 选择表格的按钮 */ + .cherry-insert-table-menu-item { + border-color: $toolbarBtnBgHover; + } } /** 选中文字时弹出的按钮 */ @@ -108,6 +112,9 @@ $mdBlockquoteBg: $VIOLET1; .cherry-bubble-bottom { border-top-color: $toolbarBg; } + .cherry-bubble-top { + border-bottom-color: $toolbarBg; + } /** 粘贴HTML内容时弹出的选择按钮 */ &.cherry-switch-paste { diff --git a/src/sass/themes/dark.scss b/src/sass/themes/dark.scss index 1a4b89557..5c973d64e 100644 --- a/src/sass/themes/dark.scss +++ b/src/sass/themes/dark.scss @@ -75,6 +75,10 @@ $mdSvgTextColor: rgb(250, 160, 0); } } } + /** 选择表格的按钮 */ + .cherry-insert-table-menu-item { + border-color: $toolbarBtnBgHover; + } } /** 选中文字时弹出的按钮 */ @@ -82,6 +86,9 @@ $mdSvgTextColor: rgb(250, 160, 0); .cherry-bubble-bottom { border-top-color: $toolbarBg; } + .cherry-bubble-top { + border-bottom-color: $toolbarBg; + } /** 粘贴HTML内容时弹出的选择按钮 */ &.cherry-switch-paste { diff --git a/src/sass/themes/green.scss b/src/sass/themes/green.scss index 7c479b2b5..58df6b36c 100644 --- a/src/sass/themes/green.scss +++ b/src/sass/themes/green.scss @@ -89,6 +89,10 @@ $mdBlockquoteBg: $GREEN1; } } } + /** 选择表格的按钮 */ + .cherry-insert-table-menu-item { + border-color: $toolbarBtnBgHover; + } } /** 选中文字时弹出的按钮 */ @@ -96,6 +100,9 @@ $mdBlockquoteBg: $GREEN1; .cherry-bubble-bottom { border-top-color: $toolbarBg; } + .cherry-bubble-top { + border-bottom-color: $toolbarBg; + } /** 粘贴HTML内容时弹出的选择按钮 */ &.cherry-switch-paste { diff --git a/src/sass/themes/light.scss b/src/sass/themes/light.scss index e81f295fb..f2bdac4b1 100644 --- a/src/sass/themes/light.scss +++ b/src/sass/themes/light.scss @@ -75,6 +75,10 @@ $mdBlockquoteBg: rgb(231, 245, 255); } } } + /** 选择表格的按钮 */ + .cherry-insert-table-menu-item { + border-color: $toolbarBtnBgHover; + } } /** 选中文字时弹出的按钮 */ @@ -82,6 +86,9 @@ $mdBlockquoteBg: rgb(231, 245, 255); .cherry-bubble-bottom { border-top-color: $toolbarBg; } + .cherry-bubble-top { + border-bottom-color: $toolbarBg; + } /** 粘贴HTML内容时弹出的选择按钮 */ &.cherry-switch-paste { diff --git a/src/sass/themes/red.scss b/src/sass/themes/red.scss index 2de1bdcff..6b9cfbdcd 100644 --- a/src/sass/themes/red.scss +++ b/src/sass/themes/red.scss @@ -89,6 +89,10 @@ $mdBlockquoteBg: $PINK1; } } } + /** 选择表格的按钮 */ + .cherry-insert-table-menu-item { + border-color: $toolbarBtnBgHover; + } } /** 选中文字时弹出的按钮 */ @@ -96,6 +100,9 @@ $mdBlockquoteBg: $PINK1; .cherry-bubble-bottom { border-top-color: $toolbarBg; } + .cherry-bubble-top { + border-bottom-color: $toolbarBg; + } /** 粘贴HTML内容时弹出的选择按钮 */ &.cherry-switch-paste { diff --git a/src/sass/themes/violet.scss b/src/sass/themes/violet.scss index ffea14e58..cda9a53db 100644 --- a/src/sass/themes/violet.scss +++ b/src/sass/themes/violet.scss @@ -88,6 +88,10 @@ $mdBlockquoteBg: $VIOLET1; } } } + /** 选择表格的按钮 */ + .cherry-insert-table-menu-item { + border-color: $toolbarBtnBgHover; + } } /** 选中文字时弹出的按钮 */ @@ -95,6 +99,9 @@ $mdBlockquoteBg: $VIOLET1; .cherry-bubble-bottom { border-top-color: $toolbarBg; } + .cherry-bubble-top { + border-bottom-color: $toolbarBg; + } /** 粘贴HTML内容时弹出的选择按钮 */ &.cherry-switch-paste { diff --git a/src/sass/variable.scss b/src/sass/variable.scss index 2e87a1620..fdd6e9312 100644 --- a/src/sass/variable.scss +++ b/src/sass/variable.scss @@ -11,8 +11,8 @@ $monospaceFont: 'Menlo', 'Liberation Mono', 'Consolas', 'DejaVu Sans Mono', 'Ubu $fontSize: 16px; $fontSizeLarge: 18px; $lineHeight: 27px; -$editorBg: #f8fafb; -$previewBg: #f8fafb; +$editorBg: #FFF; +$previewBg: #FFF; $fontColor: #3f4a56; $linkColor: #3582fb; $linkHoverColor: #056bad; diff --git a/types/cherry.d.ts b/types/cherry.d.ts index a018fd6ee..3c31ae66d 100644 --- a/types/cherry.d.ts +++ b/types/cherry.d.ts @@ -320,6 +320,16 @@ export interface CherryEngineOptions { * - none 标题没有锚点 */ anchorStyle?: 'default' | 'autonumber' | 'none', + /** + * 是否开启严格模式 + * true:严格模式 + * # head ⭕️ valid + * #head ❌ invalid + * false:宽松模式 + * # head ⭕️ valid + * #head ⭕️ valid + */ + strict?: boolean, }, }; /** 自定义语法 */