mirror of
https://github.com/darkings/Obsidian-MonokaiSyntax.git
synced 2026-07-22 04:40:26 +00:00
消除 Obsidian CSS 审核警告
This commit is contained in:
parent
11814ca8f6
commit
f963a19690
8 changed files with 20 additions and 56 deletions
21
dist/theme.css
vendored
21
dist/theme.css
vendored
|
|
@ -507,7 +507,9 @@ a:hover,
|
|||
flex: 0 0 1rem;
|
||||
width: 1rem;
|
||||
margin-inline-end: 0.35rem;
|
||||
--monokai-file-icon-color: #ffd866;
|
||||
color: var(--monokai-file-icon-color, var(--icon-color));
|
||||
content: "\e658";
|
||||
font-family: "monokai-pro-icons";
|
||||
font-size: 1rem;
|
||||
font-style: normal;
|
||||
|
|
@ -519,11 +521,6 @@ a:hover,
|
|||
text-rendering: auto;
|
||||
}
|
||||
|
||||
.nav-file-title::before {
|
||||
--monokai-file-icon-color: #ffd866;
|
||||
content: "\e658";
|
||||
}
|
||||
|
||||
.nav-file-title[data-path$=".7z"]::before {
|
||||
--monokai-file-icon-color: #ffd866;
|
||||
content: "\e666";
|
||||
|
|
@ -1084,7 +1081,7 @@ body.is-mobile .workspace-ribbon {
|
|||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
body.theme-dark {
|
||||
.theme-dark .graph-view {
|
||||
--monokai-graph-background: #1e1f1c;
|
||||
--monokai-graph-panel: #2b2c26;
|
||||
--monokai-graph-line: rgb(120 220 232 / 42%);
|
||||
|
|
@ -1096,7 +1093,7 @@ body.theme-dark {
|
|||
--monokai-graph-ring: rgb(102 217 239 / 28%);
|
||||
}
|
||||
|
||||
body.theme-light {
|
||||
.theme-light .graph-view {
|
||||
--monokai-graph-background: #f5f0e6;
|
||||
--monokai-graph-panel: #f2ead8;
|
||||
--monokai-graph-line: rgb(20 116 138 / 42%);
|
||||
|
|
@ -1369,8 +1366,7 @@ body {
|
|||
}
|
||||
|
||||
/* stylelint-disable selector-class-pattern -- Obsidian 内部类名,不能改成 kebab-case。 */
|
||||
body.theme-dark,
|
||||
body.theme-light {
|
||||
body:is(.theme-dark, .theme-light) {
|
||||
--blockquote-background-color: transparent;
|
||||
--blockquote-border-thickness: 2px;
|
||||
--callout-padding: 1.25rem;
|
||||
|
|
@ -1409,13 +1405,6 @@ body .markdown-source-view.mod-cm6 .HyperMD-quote .cm-formatting-quote {
|
|||
display: none;
|
||||
}
|
||||
|
||||
/* ===== Callout - CodeMirror 行容器(仅外层 spacing,无背景无竖线) ===== */
|
||||
body .markdown-source-view.mod-cm6 .cm-callout {
|
||||
background-color: transparent;
|
||||
border-inline-start: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
/* ===== Callout 组件(阅读 + 编辑统一:背景 + 竖线 + 内间距) ===== */
|
||||
body .markdown-preview-view.markdown-rendered .callout,
|
||||
body .markdown-rendered .callout,
|
||||
|
|
|
|||
|
|
@ -175,7 +175,9 @@ const lines = [
|
|||
' flex: 0 0 1rem;',
|
||||
' width: 1rem;',
|
||||
' margin-inline-end: 0.35rem;',
|
||||
` --monokai-file-icon-color: ${defaultFileIcon.fontColor};`,
|
||||
' color: var(--monokai-file-icon-color, var(--icon-color));',
|
||||
` content: "${cssContent(defaultFileIcon.fontCharacter)}";`,
|
||||
' font-family: "monokai-pro-icons";',
|
||||
" font-size: 1rem;",
|
||||
" font-style: normal;",
|
||||
|
|
@ -187,11 +189,6 @@ const lines = [
|
|||
" text-rendering: auto;",
|
||||
"}",
|
||||
"",
|
||||
".nav-file-title::before {",
|
||||
` --monokai-file-icon-color: ${defaultFileIcon.fontColor};`,
|
||||
` content: "${cssContent(defaultFileIcon.fontCharacter)}";`,
|
||||
"}",
|
||||
"",
|
||||
];
|
||||
|
||||
for (const [extension, iconId] of sortedEntries(obsidianFileExtensions)) {
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ const checks = [
|
|||
["图谱颜色支持过渡", /\.graph-view[\s\S]*?transition:[\s\S]*?color 140ms ease/],
|
||||
["图谱背景支持过渡", /\.graph-view[\s\S]*?background-color 180ms ease/],
|
||||
["图谱使用 Monokai Pro 背景变量", /\.graph-view[\s\S]*?background-color:\s*var\(--monokai-graph-background\)/],
|
||||
["深色图谱背景对齐导航栏与标题栏", /body\.theme-dark[\s\S]*?--monokai-graph-background:\s*#1e1f1c/],
|
||||
["浅色图谱背景对齐导航栏与标题栏", /body\.theme-light[\s\S]*?--monokai-graph-background:\s*#f5f0e6/],
|
||||
["深色图谱背景对齐导航栏与标题栏", /\.theme-dark \.graph-view[\s\S]*?--monokai-graph-background:\s*#1e1f1c/],
|
||||
["浅色图谱背景对齐导航栏与标题栏", /\.theme-light \.graph-view[\s\S]*?--monokai-graph-background:\s*#f5f0e6/],
|
||||
["图谱控制区使用 Monokai 面板变量", /\.graph-controls[\s\S]*?background-color:\s*var\(--monokai-graph-panel\)/],
|
||||
["图谱高亮节点无光晕", (scss) => !/drop-shadow\(/.test(scss)],
|
||||
["图谱容器无呼吸光晕伪元素", (scss) => !/\.workspace-leaf-content\[data-type="graph"\] \.view-content::before/.test(scss)],
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
/* stylelint-disable selector-class-pattern -- Obsidian 内部类名,不能改成 kebab-case。 */
|
||||
|
||||
body.theme-dark,
|
||||
body.theme-light {
|
||||
body:is(.theme-dark, .theme-light) {
|
||||
--blockquote-background-color: transparent;
|
||||
--blockquote-border-thickness: 2px;
|
||||
--callout-padding: 1.25rem;
|
||||
|
|
@ -43,14 +42,6 @@ body .markdown-source-view.mod-cm6 .HyperMD-quote .cm-formatting-quote {
|
|||
display: none;
|
||||
}
|
||||
|
||||
/* ===== Callout - CodeMirror 行容器(仅外层 spacing,无背景无竖线) ===== */
|
||||
|
||||
body .markdown-source-view.mod-cm6 .cm-callout {
|
||||
background-color: transparent;
|
||||
border-inline-start: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
/* ===== Callout 组件(阅读 + 编辑统一:背景 + 竖线 + 内间距) ===== */
|
||||
|
||||
body .markdown-preview-view.markdown-rendered .callout,
|
||||
|
|
|
|||
|
|
@ -17,7 +17,9 @@
|
|||
flex: 0 0 1rem;
|
||||
width: 1rem;
|
||||
margin-inline-end: 0.35rem;
|
||||
--monokai-file-icon-color: #ffd866;
|
||||
color: var(--monokai-file-icon-color, var(--icon-color));
|
||||
content: "\e658";
|
||||
font-family: "monokai-pro-icons";
|
||||
font-size: 1rem;
|
||||
font-style: normal;
|
||||
|
|
@ -29,11 +31,6 @@
|
|||
text-rendering: auto;
|
||||
}
|
||||
|
||||
.nav-file-title::before {
|
||||
--monokai-file-icon-color: #ffd866;
|
||||
content: "\e658";
|
||||
}
|
||||
|
||||
.nav-file-title[data-path$=".7z"]::before {
|
||||
--monokai-file-icon-color: #ffd866;
|
||||
content: "\e666";
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
body.theme-dark {
|
||||
.theme-dark .graph-view {
|
||||
--monokai-graph-background: #1e1f1c;
|
||||
--monokai-graph-panel: #2b2c26;
|
||||
--monokai-graph-line: rgb(120 220 232 / 42%);
|
||||
|
|
@ -46,7 +46,7 @@ body.theme-dark {
|
|||
--monokai-graph-ring: rgb(102 217 239 / 28%);
|
||||
}
|
||||
|
||||
body.theme-light {
|
||||
.theme-light .graph-view {
|
||||
--monokai-graph-background: #f5f0e6;
|
||||
--monokai-graph-panel: #f2ead8;
|
||||
--monokai-graph-line: rgb(20 116 138 / 42%);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
export default {
|
||||
extends: ["stylelint-config-standard-scss"],
|
||||
rules: {
|
||||
"color-hex-length": "long",
|
||||
"declaration-no-important": true,
|
||||
"max-nesting-depth": 3,
|
||||
"selector-max-id": 0,
|
||||
|
|
|
|||
21
theme.css
21
theme.css
|
|
@ -507,7 +507,9 @@ a:hover,
|
|||
flex: 0 0 1rem;
|
||||
width: 1rem;
|
||||
margin-inline-end: 0.35rem;
|
||||
--monokai-file-icon-color: #ffd866;
|
||||
color: var(--monokai-file-icon-color, var(--icon-color));
|
||||
content: "\e658";
|
||||
font-family: "monokai-pro-icons";
|
||||
font-size: 1rem;
|
||||
font-style: normal;
|
||||
|
|
@ -519,11 +521,6 @@ a:hover,
|
|||
text-rendering: auto;
|
||||
}
|
||||
|
||||
.nav-file-title::before {
|
||||
--monokai-file-icon-color: #ffd866;
|
||||
content: "\e658";
|
||||
}
|
||||
|
||||
.nav-file-title[data-path$=".7z"]::before {
|
||||
--monokai-file-icon-color: #ffd866;
|
||||
content: "\e666";
|
||||
|
|
@ -1084,7 +1081,7 @@ body.is-mobile .workspace-ribbon {
|
|||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
body.theme-dark {
|
||||
.theme-dark .graph-view {
|
||||
--monokai-graph-background: #1e1f1c;
|
||||
--monokai-graph-panel: #2b2c26;
|
||||
--monokai-graph-line: rgb(120 220 232 / 42%);
|
||||
|
|
@ -1096,7 +1093,7 @@ body.theme-dark {
|
|||
--monokai-graph-ring: rgb(102 217 239 / 28%);
|
||||
}
|
||||
|
||||
body.theme-light {
|
||||
.theme-light .graph-view {
|
||||
--monokai-graph-background: #f5f0e6;
|
||||
--monokai-graph-panel: #f2ead8;
|
||||
--monokai-graph-line: rgb(20 116 138 / 42%);
|
||||
|
|
@ -1369,8 +1366,7 @@ body {
|
|||
}
|
||||
|
||||
/* stylelint-disable selector-class-pattern -- Obsidian 内部类名,不能改成 kebab-case。 */
|
||||
body.theme-dark,
|
||||
body.theme-light {
|
||||
body:is(.theme-dark, .theme-light) {
|
||||
--blockquote-background-color: transparent;
|
||||
--blockquote-border-thickness: 2px;
|
||||
--callout-padding: 1.25rem;
|
||||
|
|
@ -1409,13 +1405,6 @@ body .markdown-source-view.mod-cm6 .HyperMD-quote .cm-formatting-quote {
|
|||
display: none;
|
||||
}
|
||||
|
||||
/* ===== Callout - CodeMirror 行容器(仅外层 spacing,无背景无竖线) ===== */
|
||||
body .markdown-source-view.mod-cm6 .cm-callout {
|
||||
background-color: transparent;
|
||||
border-inline-start: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
/* ===== Callout 组件(阅读 + 编辑统一:背景 + 竖线 + 内间距) ===== */
|
||||
body .markdown-preview-view.markdown-rendered .callout,
|
||||
body .markdown-rendered .callout,
|
||||
|
|
|
|||
Loading…
Reference in a new issue