From a3f07e05a848c5f44fcf01f78b27a2f7279c2ca4 Mon Sep 17 00:00:00 2001 From: fantasticit Date: Sun, 3 Apr 2022 20:21:48 +0800 Subject: [PATCH] feat: improve img style --- packages/client/src/tiptap/styles/base.scss | 30 ++++++++++----------- packages/client/src/tiptap/styles/code.scss | 4 --- 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/packages/client/src/tiptap/styles/base.scss b/packages/client/src/tiptap/styles/base.scss index 1d610d00..f92c28db 100644 --- a/packages/client/src/tiptap/styles/base.scss +++ b/packages/client/src/tiptap/styles/base.scss @@ -1,18 +1,8 @@ .ProseMirror { - font-family: - 'Chinese Quote', - 'Segoe UI', - Roboto, - RobotoNum, - 'PingFang SC', - 'Hiragino Sans GB', - 'Microsoft YaHei', - 'Helvetica Neue', - Helvetica, - Arial, - sans-serif; + font-family: 'Chinese Quote', 'Segoe UI', Roboto, RobotoNum, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', + 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.74; - letter-spacing: .008em; + letter-spacing: 0.008em; color: var(--semi-color-text-0); word-break: break-word; word-wrap: break-word; @@ -34,19 +24,19 @@ } p { - margin-top: .75rem; + margin-top: 0.75rem; margin-bottom: 0; font-size: 1em; font-weight: normal; line-height: 1.714; - letter-spacing: -.005em; + letter-spacing: -0.005em; } blockquote { box-sizing: border-box; padding-left: 10px; border-left: 2px solid var(--semi-color-fill-2); - margin: .75rem 0; + margin: 0.75rem 0; } hr { @@ -80,3 +70,11 @@ /* stylelint-disable-next-line declaration-block-no-duplicate-properties */ cursor: col-resize; } + +body[theme-mode='dark'] { + .ProseMirror { + img { + opacity: 0.75; + } + } +} diff --git a/packages/client/src/tiptap/styles/code.scss b/packages/client/src/tiptap/styles/code.scss index 5e2a78d1..830ba537 100644 --- a/packages/client/src/tiptap/styles/code.scss +++ b/packages/client/src/tiptap/styles/code.scss @@ -280,8 +280,4 @@ body[theme-mode='dark'] { color: #ffdcd7; background-color: #67060c; } - - img { - opacity: 0.75; - } }