3 Star 8 Fork 1

ZekunC/Obsidian-Typora-Vue-Theme

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
obsidian.css 5.75 KB
一键复制 编辑 原始数据 按行查看 历史
ZeKunC 提交于 2024-10-30 19:18 +08:00 . fix: code color in list
/*
[Obsidian-Typora-Vue-Theme](https://github.com/ZekunC/Obsidian-Typora-Vue-Theme) (**v1.0.3**) is a theme for [Obsidian](https://obsidian.md/), which is inspired by [typora-vue-theme](https://github.com/blinkfox/typora-vue-theme)and [Blue Topaz](https://github.com/whyt-byte/Blue-Topaz_Obsidian-css/).
*/
/* The primary color is #42b983 or #42b883.*/
body{
--accent-h: 153;
--accent-s: 47%;
--accent-l: 49%;
--icon-color-hover: hsl(var(--interactive-accent-hsl));
--background-modifier-message: hsl(var(--interactive-accent-hsl));
--background-modifier-hover: hsla(var(--interactive-accent-hsl), 0.05);
--nav-item-color-hover: hsl(var(--interactive-accent-hsl));
--nav-item-color-active: hsl(var(--interactive-accent-hsl));
--table-header-weight: var(--bold-weight);
--table-header-color: var(--text-normal);
--h1-size: 2.2em;
--h2-size: 1.75em;
--h3-size: 1.4em;
--h4-size: 1.2em;
--h5-size: 1em;
--h6-size: 1em;
}
.theme-light{
--text-normal: #34495e;
--background-secondary: #ffffff;
--code-background: #f8f8f8;
--cus-inline-code-text: #e96900;
--cus-code-block-border: #f4f4f4;
--cus-table-header: #f2f2f2;
--cus-table-gap-tr: #fafafa;
--table-row-background-hover: #f2f2f2;
--cus-highlight-cursor-line: rgba(245,204,142,0.12);
}
.theme-dark{
--text-normal: #EEEEEE;
--code-background: #1a1a1a;
--cus-inline-code-text: #f3b37f;
--cus-code-block-border: #1c1c1c;
--cus-table-header: #171717;
--cus-table-gap-tr: #1a1a1a;
--table-row-background-hover: #171717;
--cus-highlight-cursor-line: rgba(225,225,225, 0.12);
}
/* blockquote BEGIN*/
.markdown-rendered blockquote{
padding: var(--size-4-2) var(--size-4-3);
background-color: hsla(var(--interactive-accent-hsl), 0.1);
border-left: 4px solid hsl(var(--interactive-accent-hsl));
}
.markdown-source-view.mod-cm6.is-live-preview .HyperMD-quote:before{
border-left: 4px solid hsl(var(--interactive-accent-hsl));
}
.markdown-source-view.mod-cm6.is-live-preview .HyperMD-quote {
background-color: hsla(var(--interactive-accent-hsl), 0.1);
}
/* blockquote END*/
/* code block BEGIN*/
.markdown-source-view.mod-cm6 .code-block-flair:hover, .markdown-rendered button.copy-code-button:hover{
background-color: hsla(var(--interactive-accent-hsl), 0.1);
}
.cm-s-obsidian span.cm-inline-code{
color: var(--cus-inline-code-text);
}
.markdown-rendered p code{
color: var(--cus-inline-code-text);
}
.markdown-rendered pre{
border:1px solid var(--cus-code-block-border);
}
.cm-s-obsidian div.HyperMD-codeblock-begin-bg{
border-top: 1px solid var(--cus-code-block-border);
}
.cm-s-obsidian div.HyperMD-codeblock-end-bg{
border-bottom: 1px solid var(--cus-code-block-border);
}
.markdown-source-view.mod-cm6 .cm-line.HyperMD-codeblock{
border-left: 1px solid var(--cus-code-block-border);
border-right: 1px solid var(--cus-code-block-border);
}
.markdown-rendered li code{
color: var(--cus-inline-code-text);
}
/* code block END*/
/* table BEGIN*/
table thead{
background-color: var(--cus-table-header);
font-weight: bold;
}
table tr:nth-child(2n),
thead {
background-color: var(--cus-table-gap-tr);
}
/* table END*/
/*Header BEGIN*/
.markdown-preview-view h1, .markdown-preview-view h2, .markdown-preview-view h3, .markdown-preview-view h4, .markdown-preview-view h5, .markdown-preview-view h6{
position:relative;
}
.markdown-preview-view h1:hover::before, .HyperMD-header .cm-header-1:hover::before{
content: 'h1';
position: absolute;
font-size: 10px;
color: rgb(221 221 221);
font-weight: 400;
width: auto;
left: -19px;
border: 1px solid;
padding: 0px 2px;
border-radius: 3px;
top: 1px;
}
.markdown-preview-view h2:hover::before, .HyperMD-header .cm-header-2:hover::before{
content: 'h2';
position: absolute;
font-size: 10px;
color: rgb(221 221 221);
font-weight: 400;
width: auto;
margin: 0;
left: -20px;
border: 1px solid;
padding: 0px 2px;
border-radius: 3px;
top: -4px;
}
.markdown-preview-view h3:hover::before, .HyperMD-header .cm-header-3:hover::before{
content: 'h3';
position: absolute;
font-size: 10px;
color: rgb(221 221 221);
font-weight: 400;
width: auto;
margin: 0;
left: -20px;
border: 1px solid;
padding: 0px 2px;
border-radius: 3px;
top: -6px;
}
.markdown-preview-view h4:hover::before, .HyperMD-header .cm-header-4:hover::before{
content: 'h4';
position: absolute;
font-size: 10px;
color: rgb(221 221 221);
font-weight: 400;
width: auto;
margin: 0;
left: -21px;
border: 1px solid;
padding: 0px 2px;
border-radius: 3px;
top: -8px;
}
.markdown-preview-view h5:hover::before, .HyperMD-header .cm-header-5:hover::before{
content: 'h5';
position: absolute;
font-size: 10px;
color: rgb(221 221 221);
font-weight: 400;
width: auto;
margin: 0;
left: -20px;
border: 1px solid;
padding: 0px 2px;
border-radius: 3px;
top: -11px;
}
.markdown-preview-view h6:hover::before, .HyperMD-header .cm-header-6:hover::before{
content: 'h6';
position: absolute;
font-size: 10px;
color: rgb(221 221 221);
font-weight: 400;
width: auto;
margin: 0;
left: -20px;
border: 1px solid;
padding: 0px 2px;
border-radius: 3px;
top: -11px;
}
/*Header END*/
/*Cursor line BEGIN*/
.cm-active.cm-line{
background:var(--cus-highlight-cursor-line) !important;
}
/*Cursor line END*/
/*Hover Font color BEGIN*/
.menu-item:hover:not(.is-disabled):not(.is-label), .suggestion-item.is-selected{
color: hsl(var(--interactive-accent-hsl));
}
/*Hover Font color END*/
/*Navigator File BEGIN*/
.nav-file-title.is-active::before{
border-left: 4px solid hsl(var(--interactive-accent-hsl));
content: "";
position: absolute;
left: 0px;
top: 0;
height: 100%;
}
/*Navigator File END*/
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
CSS
1
https://gitee.com/zekunc/Obsidian-Typora-Vue-Theme.git
git@gitee.com:zekunc/Obsidian-Typora-Vue-Theme.git
zekunc
Obsidian-Typora-Vue-Theme
Obsidian-Typora-Vue-Theme
master

搜索帮助