1 Star 0 Fork 0

向着悠远的苍穹/TyporaThemes

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
auto-number-bp.css 3.82 KB
一键复制 编辑 原始数据 按行查看 历史
向着悠远的苍穹 提交于 2023-12-06 23:43 . first commit
#write {
counter-reset: write-h2 write-h3 write-h4 !important;
/*修复缺失上级标题时无法递增*/
}
/* 编辑器内标题-重置 */
#write h1 {
counter-reset: write-h2;
}
#write h2 {
counter-reset: write-h3;
}
#write h3 {
counter-reset: write-h4;
}
/* 编辑器内标题-显示 */
#write h2:before {
counter-increment: write-h2;
content: counter(write-h2) " "
}
#write h3:before {
counter-increment: write-h3;
content: counter(write-h2) "." counter(write-h3) " "
}
#write h4:before {
counter-increment: write-h4;
content: counter(write-h2) "." counter(write-h3) "." counter(write-h4) " "
}
.md-toc-content .md-toc-h1 {
counter-reset: toc-h2;
}
.md-toc-content .md-toc-h2 {
counter-reset: toc-h3;
}
.md-toc-content .md-toc-h3 {
counter-reset: toc-h4;
}
.md-toc-content .md-toc-h4 {
display: none;
}
.md-toc-content .md-toc-h5 {
display: none;
}
/* 目录标题-显示*/
.md-toc-content .md-toc-h2:before {
counter-increment: toc-h2;
content: counter(toc-h2) " ";
}
.md-toc-content .md-toc-h3:before {
counter-increment: toc-h3;
content: counter(toc-h2) "." counter(toc-h3) " "
}
.md-toc-content .md-toc-h4:before {
counter-increment: toc-h4;
content: counter(toc-h2) "." counter(toc-h3) "." counter(toc-h4) " "
}
/* 大纲标题 -重置*/
.sidebar-content {
counter-reset: outline-h2 outline-h3 outline-h4;
/*修复缺失上级标题时无法递增*/
}
.sidebar-content .outline-h1 {
counter-reset: outline-h2;
}
.sidebar-content .outline-h2 {
counter-reset: outline-h3;
}
.sidebar-content .outline-h3 {
counter-reset: outline-h4;
}
/* 大纲标题 -显示*/
.sidebar-content .outline-h2 .outline-label:before {
counter-increment: outline-h2;
content: counter(outline-h2) " ";
}
.sidebar-content .outline-h3 .outline-label:before {
counter-increment: outline-h3;
content: counter(outline-h2) "." counter(outline-h3) " "
}
.sidebar-content .outline-h4 .outline-label:before {
counter-increment: outline-h4;
content: counter(outline-h2) "." counter(outline-h3) "." counter(outline-h4) " "
}
/* 侧边栏自动编号 */
.outline-content {
counter-reset: outline-h2;
}
.outline-h1 {
counter-reset: outline-h2;
}
.outline-h2 {
counter-reset: outline-h3;
}
.outline-h3 {
counter-reset: outline-h4;
}
.outline-h4 {
counter-reset: outline-h5;
}
.outline-h5 {
counter-reset: outline-h6;
}
.outline-content .outline-h2 .outline-label:before {
counter-increment: outline-h2;
content: counter(outline-h2) ". ";
}
.outline-content .outline-h3 .outline-label:before {
counter-increment: outline-h3;
content: counter(outline-h2) "." counter(outline-h3) ". ";
}
.outline-content .outline-h4 .outline-label:before {
counter-increment: outline-h4;
content: counter(outline-h2) "." counter(outline-h3) "." counter(outline-h4) ". ";
}
.outline-content .outline-h5 .outline-label:before {
counter-increment: outline-h5;
content: counter(outline-h2) "." counter(outline-h3) "." counter(outline-h4) "." counter(outline-h5) ". ";
}
.outline-content .outline-h6 .outline-label:before {
counter-increment: outline-h6;
content: counter(outline-h2) "." counter(outline-h3) "." counter(outline-h4) "." counter(outline-h5) "." counter(outline-h6) ". ";
}
/** override the default style for focused headings */
#write>h3.md-focus:before,
#write>h4.md-focus:before,
#write>h5.md-focus:before,
#write>h6.md-focus:before,
h3.md-focus:before,
h4.md-focus:before,
h5.md-focus:before,
h6.md-focus:before {
color: inherit;
border: inherit;
border-radius: inherit;
position: inherit;
left: initial;
float: none;
top: initial;
font-size: inherit;
padding-left: inherit;
padding-right: inherit;
vertical-align: inherit;
font-weight: inherit;
line-height: inherit;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kdjlyy/typora-themes.git
[email protected]:kdjlyy/typora-themes.git
kdjlyy
typora-themes
TyporaThemes
main

搜索帮助