typora的配色方案
base.user.css
:root {
/*定义全局变量*/
/*这个文件是自已建立用来修改所有主题的基本样式*/
/*一级标题居中,二级标题带下划线分割 配色为wind10黑色*/
/*代码块黑色背景,csdn的配色*/
--title-color: #32423F;
--font-sans-serif: 'Ubuntu', 'Source Sans Pro', sans-serif !important;
}
/*标题自动添加序号
.sidebar-content {
counter-reset: h1
}
.outline-h1 {
counter-reset: h2
}
.outline-h2 {
counter-reset: h3
}
.outline-h3 {
counter-reset: h4
}
.outline-h4 {
counter-reset: h5
}
.outline-h5 {
counter-reset: h6
}
.outline-h1>.outline-item>.outline-label:before {
counter-increment: h1;
content: counter(h1) " "
}
.outline-h2>.outline-item>.outline-label:before {
counter-increment: h2;
content: counter(h1) "."counter(h2) " "
}
.outline-h3>.outline-item>.outline-label:before {
counter-increment: h3;
content: counter(h1) "."counter(h2) "."counter(h3) " "
}
.outline-h4>.outline-item>.outline-label:before {
counter-increment: h4;
content: counter(h1) "."counter(h2) "."counter(h3) "."counter(h4) " "
}
.outline-h5>.outline-item>.outline-label:before {
counter-increment: h5;
content: counter(h1) "."counter(h2) "."counter(h3) "."counter(h4) "."counter(h5) " "
}
.outline-h6>.outline-item>.outline-label:before {
counter-increment: h6;
content: counter(h1) "."counter(h2) "."counter(h3) "."counter(h4) "."counter(h5) "."counter(h6) " "
}
#write {
counter-reset: h1
}
h1 {
counter-reset: h2
}
h2 {
counter-reset: h3
}
h3 {
counter-reset: h4
}
h4 {
counter-reset: h5
}
h5 {
counter-reset: h6
}
#write h1:before {
counter-increment: h1;
content: counter(h1) " "
}
#write h2:before {
counter-increment: h2;
content: counter(h1) "."counter(h2) " "
}
#write h3:before,
h3.md-focus.md-heading:before
{
counter-increment: h3;
content: counter(h1) "."counter(h2) "."counter(h3) " "
}
#write h4:before,
h4.md-focus.md-heading:before {
counter-increment: h4;
content: counter(h1) "."counter(h2) "."counter(h3) "."counter(h4) " "
}
#write h5:before,
h5.md-focus.md-heading:before {
counter-increment: h5;
content: counter(h1) "."counter(h2) "."counter(h3) "."counter(h4) "."counter(h5) " "
}
#write h6:before,
h6.md-focus.md-heading:before {
counter-increment: h6;
content: counter(h1) "."counter(h2) "."counter(h3) "."counter(h4) "."counter(h5) "."counter(h6) " "
}
#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;
}
*/
/*标题*/
/*一级标题居中,二级标题带下划线分割 配色为wind10黑色*/
h1,
h2,
h3,
h4,
h5,
h6 {
position: relative;
margin-top: 1rem;
margin-bottom: 0.5rem;
/* font-weight: bold; */
font-weight: 500 !important;
line-height: 1.4;
cursor: text;
color: var(--title-color);
font-family: var(--font-sans-serif);
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
text-decoration: none;
}
h1 tt,
h1 code {
font-size: inherit !important;
}
h2 tt,
h2 code {
font-size: inherit !important;
}
h3 tt,
h3 code {
font-size: inherit !important;
}
h4 tt,
h4 code {
font-size: inherit !important;
}
h5 tt,
h5 code {
font-size: inherit !important;
}
h6 tt,
h6 code {
font-size: inherit !important;
}
h1 {
padding-bottom: .4rem;
font-size: 2.2rem;
line-height: 1.3;
}
h1 {
text-align: center;
padding-bottom: 0.3em;
font-size: 2.2em;
line-height: 1.2;
margin: 2.4em auto 1.2em;
}
h1:after {
content: '';
display: block;
margin: 0.2em auto 0;
width: 100px;
height: 2px;
border-bottom: 2px solid var(--title-color);
}
h2 {
margin: 1.6em auto 0.5em;
padding-left: 10px;
line-height: 1.4;
font-size: 1.8em;
border-left: 9px solid var(--title-color);
border-bottom: 1px solid var(--title-color);
}
h3 {
font-size: 1.5rem;
margin: 1.2em auto 0.5em;
}
h4 {
font-size: 1.3rem;
}
h5 {
font-size: 1.2rem;
}
h6 {
font-size: 1.1rem;
}
/*因为不同主题的代码块部分不一样,code部分统一*/
.CodeMirror-lines {
padding-left: 4px;
}
.code-tooltip {
box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
border-top: 1px solid #eef2f2;
}
.md-fences,
code,
tt {
background-color: #f8f8f8;
border-radius: 3px;
padding: 0;
padding-left: 4px !important;
padding-right: 4px !important;
font-size: 0.9em;
}
code {
background-color: #f3f4f4;
padding: 0 2px 0 2px;
}
.md-fences {
margin-bottom: 15px;
margin-top: 15px;
padding-top: 8px;
padding-bottom: 6px;
}
.md-task-list-item > input {
margin-left: -1.3em;
}
@media print {
html {
font-size: 13px;
}
table,
pre {
page-break-inside: avoid;
}
pre {
word-wrap: break-word;
}
}
.md-fences {
background-color: #f8f8f8;
}
#write pre.md-meta-block {
padding: 1rem;
font-size: 85%;
line-height: 1.45;
background-color: #f7f7f7;
border: 0;
border-radius: 3px;
color: #777777;
margin-top: 0 !important;
}
.mathjax-block>.code-tooltip {
bottom: .375rem;
}
/*深色背景*/
#write .md-fences:not([mermaid-type]) {
padding-top: 7px;
border-radius: 10px;
background-color: #282C34;/*代码块背景*/
color: #ABB2BF;
}
.code-tooltip .ty-input,
.code-tooltip input {
color: #C5C5C5 ;/*语言标签颜色*/
}
/*修改代码块字体*/
#write .CodeMirror-wrap .CodeMirror-code pre {
font-family: JetBrains Mono;
}
/*MAC的三个图标*/
/*
.CodeMirror-wrap .CodeMirror-scroll {
padding-top: 20px;
}
#write .md-fences:before {
content: "";
z-index: 4;
display: block;
position: absolute;
top: 7px;
left: 13px;
width: 15px;
height: 15px;
border-radius: 50%;
float: left;
background-color: #fa3534;
}
#write .CodeMirror-scroll:before {
content: "";
display: block;
position: absolute;
top: 0px;
left: 29px;
width: 15px;
height: 15px;
border-radius: 50%;
float: left;
z-index: 999;
background-color: #ff9900;
}
#write .md-fences::after {
content: "";
z-index: 4;
display: block;
position: absolute;
top: 7px;
left: 53px;
width: 15px;
height: 15px;
border-radius: 50%;
float: left;
background-color: #19be6b;
}
/**/
/*配色*/
.CodeMirror-line .cm-number,/*数字*/
.CodeMirror-line .cm-property {/*被调用的方法*/
color: #f08d49;
}
.CodeMirror-line .cm-variable-3,/*形参,类型*/
.CodeMirror-line .cm-qualifier,/*css class*/
.CodeMirror-line .cm-variable-2 {/*被使用的形参*/
color: #EE9900;
}
.CodeMirror-line .cm-meta,/*省略号,注解等*/
.CodeMirror-line .cm-atom,/*css属性值,布尔值等等*/
.CodeMirror-line .cm-keyword{/*关键字*/
color: #cc99cd;
}
.CodeMirror-line .cm-def,/*变量名*/
.CodeMirror-line .cm-variable {/*被使用的变量名*/
color: #EE9900;
}
.CodeMirror-line .cm-builtin {/*被调用的属性*/
color: #82AAFF;
}
.CodeMirror-line .cm-comment {/*注释*/
color: #5C6370;
}
.CodeMirror-line .cm-string,/*字符串*/
.CodeMirror-line .cm-string-2 {/*正则表达式*/
color: #669900
}
.CodeMirror-line .cm-operator {/*运算符*/
color: #67cdcc
}
.CodeMirror div.CodeMirror-cursor {/*光标*/
border-left: 1px solid #fff;
z-index: 3;
}
.CodeMirror-selected,/*选中的背景*/
.CodeMirror-selectedtext {
background: #666 !important;
}
/*html*/
.CodeMirror-line .cm-tag{/*标签名字*/
color: #F07178;
}
.CodeMirror-line .cm-bracket{/*标签尖括号*/
color: #EBEDEF;
}
.CodeMirror-line .cm-attribute{/*属性*/
color: #EE9900;
}
/*
代码块行数的分割线*/
.CodeMirror-gutters{
border-right: 1px solid #C5C5C5;
}
/*图像对齐*/
p .md-image:only-child{
width: auto;
text-align: inherit;
}
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?