使用主题:

VSCode Lite Edit

代码片段记录

左上方状态栏颜色

1
2
3
4
:root[data-theme-mode=dark] {
--mk-toolbar-item--active: #3c3c3c !important;
--mk-toolbar-item-barWorkspace--hover: #3c3c3c !important;
}

底部菜单栏颜色

1
2
3
4
5
6
7
8
9
10
.status {
background-color: #3C3C3C;
}

.status * {
color: #Dadada;
font-size: 14px;
font-weight: 600;
font-family: 'Cascadia Mono', 'Cascadia Code', 'Microsoft YaHei UI', var(--b3-font-family);
}

虚线备注

1
2
3
4
5
/* 虚线备注 CSS片段 https://github.com/TCOTC/siyuan-css-dashed-line-memo */
.b3-typography span[data-type~=inline-memo], .protyle-wysiwyg span[data-type~=inline-memo] {
background-color: transparent;
border-bottom: 2px dashed var(--b3-theme-primary) !important;
}

大纲字体

1
2
3
.fn__flex-column.layout__dockr .file-tree {
font-size: 13px !important;
}

行间距

1
2
3
.protyle-wysiwyg>.p {
line-height: 2.3; /*段落块的行间距,段间距的话前面该改成margin*/
}

文档树间距

1
2
3
.b3-list-item {
line-height: 38px !important;
}

标题居中

1
2
3
.protyle-title__input {
text-align: center;
}

滚动条

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
.protyle-content:hover::-webkit-scrollbar-thumb {
opacity: unset;
background: unset;
}

.protyle-content::-webkit-scrollbar {
width: 10px;
height: 10px;
}

.protyle-content::-webkit-scrollbar-track {
border: unset;
}

.protyle-content::-webkit-scrollbar-thumb {
opacity: unset;
background: unset;
-webkit-transition: unset;
box-sizing: content-box;
border: 4px solid rgba(0,0,0,0);
border-radius: var(--b3-border-radius);
box-shadow: inset 0 0 5px 5px var(--b3-scroll-color);
}

.protyle-content::-webkit-scrollbar-thumb:hover {
background: unset;
border-width: 1px
}

.protyle-content::-webkit-scrollbar-thumb:active {
background: unset;
}

去除钉住显示绿色横线

1
2
3
4
5
.layout-tab-bar .item.item--pin {
border-top: 0px solid var(--b3-theme-success);
border-bottom: 2px solid transparent;
box-sizing: border-box;
}

标题颜色

1
2
3
4
5
6
7
8
9
10
:root[data-theme-mode=dark] {
[data-node-id].h1, .protyle-preview h1 {
color: rgb(243, 153, 147) !important;
}

/*大纲颜色*/
.sy__outline ul.b3-list.b3-list--background [data-subtype=h1], ul.b3-list.b3-list--background [data-subtype=h1] .b3-list-item__text {
color: rgb(243, 153, 147) !important;
}
}

隐藏文档树前面的图标

1
2
3
4
5
6
7
8
.block__logoicon {
margin-right: 4px;
height: 16px;
width: 16px;
padding: 4px;
flex-shrink: 0;
display: none;
}

下划线样式

1
2
3
4
5
6
7
8
.b3-typography u, .b3-typography span[data-type~=u], .protyle-wysiwyg u, .protyle-wysiwyg span[data-type~=u] {
background-image: none
background-size: 200% 100%;
background-position: 100% 0;
background-repeat: no-repeat;
transition: 0.3s cubic-bezier(0.8, 0, 0.9, 1);
border-bottom: 2px dashed #3575f0 !important;
}

去除图片后的多余空行 CSS 片段

1
2
3
4
/* 去除图片后的多余空行 CSS片段 */
.b3-typography .img:not([style]), .protyle-wysiwyg .img:not([style]) {
display:inline-block;
}

先到这里 ,有点累了 ,晚点时间再整……