Typora 的自定义主题
主题 自定义,参见 官方文档:Add Custom CSS
不管选用哪个主题,base.user.css 都起作用。
只在选用主题 * 时,*.user.css 才起作用。
代码高亮 自定义,参见 官方文档:Code Block Styles
自用备份(配合 Blubook 主题):
/* base.user.css */
@font-face{font-family:cnQuotePair;src:local('FZFW ZhuZi A YuanS');unicode-range:U+201c,U+201d}
:root {--nf:cnQuotePair,-apple-system,BlinkMacSystemFont,sans-serif;--cf:Menlo,Monaco,'Courier New',monospace}
* {margin:0;padding:0;box-sizing:border-box}
html,body{color:#333;background-color:#fff;box-sizing:border-box}
html {font-size:10px}
body{font-size:16px;line-height:2em;font-family:var(--nf);font-weight:500;text-rendering:geometricPrecision}
h1 {font-size:32px}
h2 {font-size:28px}
h3 {font-size:24px}
h4,p {font-size:16px}
hr {border:none;border-top:1px solid #ddd}
#write {position:static;width:90%;height:auto;max-width:1280px;line-height:1.5;transform:none;padding:36px 0}
a {color:#39e;text-decoration:none;cursor:pointer}
a:hover {color:red}
strong {font-weight:bold;color:blue}
#write h1,
#write h2,
#write h3,
#write h4,
#write p {width:auto;margin:0;padding:.5em 0;text-align:justify;font-style:normal}
p {line-height:1.5}
.file-node-icon,.file-node-open-state {line-height:32px}
.file-node-content {height:32px;line-height:32px;margin:0;padding-top:0}
#typora-sidebar .file-tree-node.file-library-file-node.active .file-node-background {height:32px}
#typora-sidebar .file-tree-node.file-library-file-node:not(.active):hover .file-node-background {background:#243959;border-radius:12px;height:32px}
h1:before,
h2:before,
h3:before,
h4:before {position:absolute;right:calc(100% + 2rem);color:#eee}
h1:before {content:'h1'}
h2:before {content:'h2'}
h3:before {content:'h3'}
h4:before {content:'h4'}
h1.md-focus:before,
h2.md-focus:before,
h3.md-focus:before,
h4.md-focus:before{
position:absolute;top:initial;right:calc(100% + 2rem);left:inherit;
line-height:inherit;padding-left:inherit;padding-right:inherit;
color:lime;font-size:inherit;font-weight:inherit;
border:inherit;border-radius:inherit
}
ol,ul {margin:0;padding:.5em 0 .5em 1.5em;line-height:1.5;font-size:14px}
#write li p {padding:0;font-size:14px}
blockquote{
position:relative;padding:1rem calc(2rem - 5px) 1rem 2rem;line-height:1;
background-color:#f5f5f5;border-radius:6px;outline:none
}
blockquote:before{
content:'';width:5px;height:100%;position:absolute;top:0;left:0;
background-color:#e6e6e6;border-top-left-radius:6px;border-bottom-left-radius:6px
}
blockquote p {font-size:14px}
blockquote blockquote {background-color:#e6e6e6}
blockquote blockquote:before {background-color:#dbdbdb}
#write .md-fences {padding:.5em 0;font-size:12px;background-color:transparent}
.CodeMirror-sizer {margin-right:1rem}
.CodeMirror-code {line-height:1.5}
pre {width:auto;font-family:var(--cf)}
.cm-s-inner .cm-comment {font-family:var(--nf)}
#write kbd,
#write code {
font-family:var(--nf);font-size:calc(1em - 2px);font-weight:normal;
margin:0 .25em;padding:.25em .5em;
border-radius:3px;box-shadow:none;
vertical-align:baseline
}
#write code {color:#ff502c;background:#ffebeb;border:1px solid transparent}
figure {margin:0;padding:.5em 0}
figure table {width:auto;font-size:14px}
table tr th,table tr td {border-color:#eee}
p>.md-image:only-child:not(.md-img-error) img,
p>img:only-child{margin:0;border:1px solid #eee;box-shadow:0 0 8px 0 rgba(29,43,76,.1)}
.md-toc{margin-top:8rem;border:none}
.md-toc:before{
content:"目录";font-size:10px;text-align:center;
position:absolute!important;left:0;bottom:100%;
display:block;width:100%;height:3em;line-height:3;
border-top:1px solid #333
}
.md-toc:focus:before {display:none}
.md-toc-content {line-height:1;margin:1rem 0}
a.md-toc-inner {line-height:2}
.md-toc-h2 a.md-toc-inner {margin-left:1em}
.md-toc-h3 a.md-toc-inner {margin-left:2em}
.md-toc-h4 a.md-toc-inner {margin-left:4em;font-size:12px}
.typora-export h1:before,
.typora-export h2:before,
.typora-export h3:before,
.typora-export h4:before{display:none}

浙公网安备 33010602011771号