Skip to content

Commit

Permalink
style: 优化配色
Browse files Browse the repository at this point in the history
  • Loading branch information
sunsonliu committed Sep 27, 2024
1 parent 22d691b commit ed4d8f4
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/Cherry.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,16 @@ const defaultConfig = {
* - none 标题没有锚点
*/
anchorStyle: 'default',
/**
* 是否开启严格模式
* true:严格模式
* # head ⭕️ valid
* #head ❌ invalid
* false:宽松模式
* # head ⭕️ valid
* #head ⭕️ valid
*/
strict: false,
},
},
},
Expand Down
7 changes: 7 additions & 0 deletions src/sass/themes/blue.scss
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,20 @@ $mdBlockquoteBg: $VIOLET1;
}
}
}
/** 选择表格的按钮 */
.cherry-insert-table-menu-item {
border-color: $toolbarBtnBgHover;
}
}

/** 选中文字时弹出的按钮 */
.cherry-bubble {
.cherry-bubble-bottom {
border-top-color: $toolbarBg;
}
.cherry-bubble-top {
border-bottom-color: $toolbarBg;
}
/** 粘贴HTML内容时弹出的选择按钮 */
&.cherry-switch-paste {

Expand Down
7 changes: 7 additions & 0 deletions src/sass/themes/dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,20 @@ $mdSvgTextColor: rgb(250, 160, 0);
}
}
}
/** 选择表格的按钮 */
.cherry-insert-table-menu-item {
border-color: $toolbarBtnBgHover;
}
}

/** 选中文字时弹出的按钮 */
.cherry-bubble {
.cherry-bubble-bottom {
border-top-color: $toolbarBg;
}
.cherry-bubble-top {
border-bottom-color: $toolbarBg;
}
/** 粘贴HTML内容时弹出的选择按钮 */
&.cherry-switch-paste {

Expand Down
7 changes: 7 additions & 0 deletions src/sass/themes/green.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,20 @@ $mdBlockquoteBg: $GREEN1;
}
}
}
/** 选择表格的按钮 */
.cherry-insert-table-menu-item {
border-color: $toolbarBtnBgHover;
}
}

/** 选中文字时弹出的按钮 */
.cherry-bubble {
.cherry-bubble-bottom {
border-top-color: $toolbarBg;
}
.cherry-bubble-top {
border-bottom-color: $toolbarBg;
}
/** 粘贴HTML内容时弹出的选择按钮 */
&.cherry-switch-paste {

Expand Down
7 changes: 7 additions & 0 deletions src/sass/themes/light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,20 @@ $mdBlockquoteBg: rgb(231, 245, 255);
}
}
}
/** 选择表格的按钮 */
.cherry-insert-table-menu-item {
border-color: $toolbarBtnBgHover;
}
}

/** 选中文字时弹出的按钮 */
.cherry-bubble {
.cherry-bubble-bottom {
border-top-color: $toolbarBg;
}
.cherry-bubble-top {
border-bottom-color: $toolbarBg;
}
/** 粘贴HTML内容时弹出的选择按钮 */
&.cherry-switch-paste {

Expand Down
7 changes: 7 additions & 0 deletions src/sass/themes/red.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,20 @@ $mdBlockquoteBg: $PINK1;
}
}
}
/** 选择表格的按钮 */
.cherry-insert-table-menu-item {
border-color: $toolbarBtnBgHover;
}
}

/** 选中文字时弹出的按钮 */
.cherry-bubble {
.cherry-bubble-bottom {
border-top-color: $toolbarBg;
}
.cherry-bubble-top {
border-bottom-color: $toolbarBg;
}
/** 粘贴HTML内容时弹出的选择按钮 */
&.cherry-switch-paste {

Expand Down
7 changes: 7 additions & 0 deletions src/sass/themes/violet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,20 @@ $mdBlockquoteBg: $VIOLET1;
}
}
}
/** 选择表格的按钮 */
.cherry-insert-table-menu-item {
border-color: $toolbarBtnBgHover;
}
}

/** 选中文字时弹出的按钮 */
.cherry-bubble {
.cherry-bubble-bottom {
border-top-color: $toolbarBg;
}
.cherry-bubble-top {
border-bottom-color: $toolbarBg;
}
/** 粘贴HTML内容时弹出的选择按钮 */
&.cherry-switch-paste {

Expand Down
4 changes: 2 additions & 2 deletions src/sass/variable.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 10 additions & 0 deletions types/cherry.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,16 @@ export interface CherryEngineOptions {
* - none 标题没有锚点
*/
anchorStyle?: 'default' | 'autonumber' | 'none',
/**
* 是否开启严格模式
* true:严格模式
* # head ⭕️ valid
* #head ❌ invalid
* false:宽松模式
* # head ⭕️ valid
* #head ⭕️ valid
*/
strict?: boolean,
},
};
/** 自定义语法 */
Expand Down

0 comments on commit ed4d8f4

Please sign in to comment.