File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -908,10 +908,10 @@ body .protyle-wysiwyg [data-node-id].li > .protyle-action {
908908
909909// 代码块滚动时语言和按钮固定在编辑器顶部 CSS片段
910910// author by JeffreyChen https://ld246.com/article/1728146248791
911- // NOTE 用:not(#preview)排除导出PDF,用.protyle-wysiwyg排除导出预览,.protyle-wysiwyg[data-readonly="true"]是只读模式
911+ // NOTE 用:not(#preview)排除导出PDF,用:not(.export-img)排除导出图片,用 .protyle-wysiwyg排除导出预览,.protyle-wysiwyg[data-readonly="true"]是只读模式
912912// NOTE 导出预览的代码块没有 .protyle-action
913913.b3-typography .code-block , .protyle-wysiwyg .code-block {
914- background : var (--b3-protyle-code-background );
914+ background : var (--b3-protyle-code-background ); // 代码块背景色强制统一,覆盖代码块主题;代码块文本颜色遵循代码块主题
915915 border-radius : var (--b3-border-radius );
916916}
917917// 集市包 README 的代码块需要背景色,否则会被 README 特效样式影响
@@ -920,11 +920,11 @@ body .protyle-wysiwyg [data-node-id].li > .protyle-action {
920920 border-radius : var (--b3-border-radius );
921921}
922922.protyle-wysiwyg :not (.protyle-wysiwyg--hiderange ) .hljs ::selection {
923- background-color : var (--b3-theme-primary-lighter ); // 覆盖代码块主题
923+ background-color : var (--b3-theme-primary-lighter ); // 选中文本的高亮颜色覆盖代码块主题
924924 color : inherit ;
925925}
926926
927- div :not (#preview ) > .protyle-wysiwyg .code-block :not (pre ) {
927+ div :not (#preview ):not ( .export-img ) > .protyle-wysiwyg .code-block :not (pre ) { // 排除导出 PDF 和导出图片
928928 .protyle-action {
929929 background-color : var (--b3-parent-background );
930930 position : sticky ;
You can’t perform that action at this time.
0 commit comments