Skip to content

Commit

Permalink
fix: 适配 Dark+、Savor
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Nov 3, 2023
1 parent f173bc4 commit a782a1c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
16 changes: 14 additions & 2 deletions src/code-block/code-block-dark-plus-plus.styl
Expand Up @@ -8,6 +8,7 @@ html[data-theme-mode="light"][data-light-theme="Dark+"]
background-color: var(--custom-popover-function-menu-background-color);
backdrop-filter: var(--custom-backdrop-popover-filter);
height 32px
margin-left -5px

.b3-typography .code-block .protyle-action .protyle-action__language
.protyle-wysiwyg .code-block .protyle-action .protyle-action__language
Expand All @@ -18,8 +19,14 @@ html[data-theme-mode="light"][data-light-theme="Dark+"]
.protyle-wysiwyg .code-block .protyle-action .protyle-action__menu
margin-top 0.3rem

.protyle-wysiwyg [data-node-id].code-block
margin 0 !important

.protyle-wysiwyg [data-node-id].code-block > .protyle-linenumber__rows
padding-top 0 !important
padding-top 8 !important
margin-top 0 !important

// ===================================================================

html[data-theme-mode="dark"][data-dark-theme="Dark+"]
.code-block
Expand All @@ -29,6 +36,7 @@ html[data-theme-mode="dark"][data-dark-theme="Dark+"]
position absolute
background var(--zhi-code-tab-bg)
height 32px
margin-left -5px

.b3-typography .code-block .protyle-action .protyle-action__language
.protyle-wysiwyg .code-block .protyle-action .protyle-action__language
Expand All @@ -39,5 +47,9 @@ html[data-theme-mode="dark"][data-dark-theme="Dark+"]
.protyle-wysiwyg .code-block .protyle-action .protyle-action__menu
margin-top 0.3rem

.protyle-wysiwyg [data-node-id].code-block
margin 0 !important

.protyle-wysiwyg [data-node-id].code-block > .protyle-linenumber__rows
padding-top 0 !important
padding-top 8 !important
margin-top 0 !important
2 changes: 1 addition & 1 deletion src/code-block/code-block-rem-craft.styl
@@ -1,5 +1,5 @@
// -------------------------------------------------代码块-Rem Craft适配---------------------------------------------------
html[data-light-theme="Rem Craft"]
html[data-light-theme="Rem Craft"][data-dark-theme="Rem Craft"]
.b3-typography .code-block, .protyle-wysiwyg .code-block
background var(--zhi-code-tab-bg)

Expand Down

0 comments on commit a782a1c

Please sign in to comment.