Skip to content

Commit

Permalink
💄 引述块优化
Browse files Browse the repository at this point in the history
  • Loading branch information
Achuan-2 committed Nov 13, 2024
1 parent b8b89e5 commit 441e9d1
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 16 deletions.
6 changes: 3 additions & 3 deletions style/editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,9 @@
border-radius: 0px !important;
background: transparent !important;
}
.bq .code-block {
background: var(--b3-font-background3) !important;
}
/* .bq .code-block {
background: #f6f8fa66 !important;
} */

.protyle-wysiwyg [data-node-id].bq[style*='background-color'],
.b3-typography blockquote[style*='background-color'] {
Expand Down
21 changes: 12 additions & 9 deletions style/module/Admonition.css
Original file line number Diff line number Diff line change
Expand Up @@ -73,32 +73,34 @@
color: var(--b3-card-error-color) !important;
background-color: #f0c4b959 !important;
}
.bq[style*='background-color: var(--b3-card-error-background);'] .code-block {
/* .bq[style*='background-color: var(--b3-card-error-background);'] .code-block {
background-color: #f6d8d382 !important;
}
} */
.bq[style*='background-color: var(--b3-card-warning-background);'] span[data-type~='kbd'],
.bq[style*='background-color: var(--b3-card-warning-background);'] span[data-type~='code'] {
color: var(--b3-card-warning-color) !important;
background-color: #f0dfb959 !important;
}
.bq[style*='background-color: var(--b3-card-warning-background);'] .code-block {
/* .bq[style*='background-color: var(--b3-card-warning-background);'] .code-block {
background-color: #f7e9d08a !important;
}
} */
.bq[style*='background-color: var(--b3-card-info-background);'] span[data-type~='kbd'],
.bq[style*='background-color: var(--b3-card-info-background);'] span[data-type~='code'] {
color: var(--b3-card-info-color) !important;
background-color: #bedaeb59 !important;
}
.bq[style*='background-color: var(--b3-card-info-background);'] .code-block {
/* .bq[style*='background-color: var(--b3-card-info-background);'] .code-block {
background-color: #d2e6f4b0 !important;
}
} */

.bq[style*='background-color: var(--b3-card-success-background);'] span[data-type~='kbd'],
.bq[style*='background-color: var(--b3-card-success-background);'] span[data-type~='code'] {
color: var(--b3-card-success-color) !important;
background-color: #c7ebbe59 !important;
}


/*
.bq[style*='background-color: var(--b3-card-error-background);'] .code-block {
background-color: var(--b3-card-error-background) !important;
}
Expand Down Expand Up @@ -166,13 +168,14 @@
background-color: var(--b3-font-background12) !important;
}
*/
.bq[style*='background-color: var(--b3-font-background13);'] .code-block {
background-color: #c4c6cc !important;
}
[data-theme-mode="dark"] .bq[style*='background-color: var(--b3-font-background13);'] .code-block {
background-color: var(--b3-font-background13)!important;
background-color: var(--b3-font-background13) !important;
}

/* 优化列表线 */
.bq[style*='background-color: var(--b3-card-error-background);']
[data-node-id].li
Expand Down Expand Up @@ -306,7 +309,7 @@
.protyle-wysiwyg .bq[style*='background-color: var(--b3-font-background13);'] .bq {
border-radius: 0px !important;
border-left: 0.3em solid var(--b3-font-color13) !important;
color: var(--b3-font-color13);
color: var(--b3-font-color13) !important;
}

/* 引述块添加卡片背景色,嵌套引述块的border颜色可以进一步修改*/
Expand Down
6 changes: 6 additions & 0 deletions style/theme/Tsundoku_dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -831,4 +831,10 @@ div[data-subtype='t'][data-type='NodeList'] {
max-width: 90% !important;
width: auto;
background-color: #fff;
}


/* 引述块内的代码块 */
.bq .code-block {
background: #0f1d2a57 !important;
}
24 changes: 21 additions & 3 deletions style/theme/Tsundoku_green.css
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
--b3-protyle-search-current-background: #a5d3fe;

/* 代码片段背景 m */
--b3-protyle-code-background: #e2f4e4;
--b3-protyle-code-background: #e2f4e480;

/* 所见即所得行内元素颜色 */
--b3-protyle-inline-strong-color: #202124;
Expand Down Expand Up @@ -657,6 +657,11 @@ div[data-subtype='t'][data-type='NodeList'] {
.protyle-select {
background-color: rgba(31, 138, 93, 0.12);
}
/* 选择块 */
.protyle-wysiwyg--select:after,
.protyle-wysiwyg--hl:after {
background-color: #228be629;
}
/* 图片大小调整手柄 */

.protyle-wysiwyg [data-node-id] .img .protyle-action__drag {
Expand Down Expand Up @@ -972,7 +977,20 @@ html[data-theme-mode=light] .av__panel .b3-menu__item[draggable=true] {
mix-blend-mode: normal;
}

[data-theme-mode="light"] .protyle-wysiwyg [data-node-id].bq:not([style*='background-color']) {
.protyle-wysiwyg [data-node-id].bq:not([style*='background-color']) {
background-color: var(--b3-card-success-background);
color: var(--b3-card-success-color);
}
}
.protyle-wysiwyg [data-node-id].bq>.bq {
border: none;
border-left: 0.3em solid var(--b3-font-color4);
border-radius: 0px !important;
background: transparent !important;
}

/* 引述块内的代码块 */
.bq .code-block {
background: #e2f4e43d !important;
}


12 changes: 11 additions & 1 deletion style/theme/Tsundoku_light.css
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
--b3-protyle-search-border-color: #f2e680;
--b3-protyle-search-current-background: #a5d3fe;

/* 代码片段背景 m */
/* 代码块背景 m */
--b3-protyle-code-background: #f6f8fa;

/* 所见即所得行内元素颜色 */
Expand Down Expand Up @@ -292,3 +292,13 @@
transition: background-color 0.5s linear;
}

/* 引述块行内代码样式优化 */
.protyle-wysiwyg [data-node-id].bq span[data-type~='kbd'],
.protyle-wysiwyg [data-node-id].bq span[data-type~='code'] {
color: var(--b3-card-info-color);
background-color: #bedaeb52
}
/* 引述块内的代码块 */
.bq .code-block {
background: #f6f8fa66 !important;
}

0 comments on commit 441e9d1

Please sign in to comment.