2025-11-27 12:39:08 +00:00
|
|
|
/* Override diff2html blue tones with Obsidian's CSS variables */
|
|
|
|
|
|
|
|
|
|
/* Main diff container background */
|
2025-11-24 21:29:54 +00:00
|
|
|
.d2h-wrapper {
|
2025-12-04 23:04:20 +00:00
|
|
|
transform: translateZ(0);
|
2025-11-27 12:39:08 +00:00
|
|
|
background-color: var(--background-primary) !important;
|
|
|
|
|
box-shadow: 0px 0px 4px 1px var(--color-accent) !important;
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
/* File header background */
|
2025-11-24 21:29:54 +00:00
|
|
|
.d2h-file-header {
|
2025-11-27 12:39:08 +00:00
|
|
|
background-color: var(--background-primary) !important;
|
|
|
|
|
border-color: var(--background-modifier-border) !important;
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
/* File name container */
|
|
|
|
|
.d2h-file-name-wrapper {
|
|
|
|
|
background-color: var(--background-primary-alt) !important;
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-12-04 23:04:20 +00:00
|
|
|
.d2h-code-linenumber {
|
|
|
|
|
cursor: default;
|
2025-11-27 16:47:21 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
/* Line number backgrounds - only override context lines */
|
|
|
|
|
.d2h-code-linenumber.d2h-cntx {
|
|
|
|
|
background-color: var(--background-primary-alt) !important;
|
|
|
|
|
border-color: var(--background-modifier-border) !important;
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
/* Code line backgrounds - only override context lines */
|
|
|
|
|
.d2h-code-line.d2h-cntx {
|
|
|
|
|
background-color: var(--background-primary) !important;
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
/* Info section background */
|
|
|
|
|
.d2h-info {
|
|
|
|
|
background-color: var(--background-secondary) !important;
|
|
|
|
|
border-color: var(--background-modifier-border) !important;
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
/* File diff background */
|
|
|
|
|
.d2h-file-diff {
|
2025-12-04 23:04:20 +00:00
|
|
|
overflow: auto;
|
2025-11-27 12:39:08 +00:00
|
|
|
background-color: var(--background-primary) !important;
|
|
|
|
|
border-color: var(--background-modifier-border) !important;
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-12-04 23:04:20 +00:00
|
|
|
/* File diff size */
|
|
|
|
|
@container diff-container (max-height: 199px) {
|
|
|
|
|
.d2h-file-diff { max-height: 90cqh; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@container diff-container (min-height: 200px) {
|
|
|
|
|
.d2h-file-diff { max-height: 95cqh; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@container diff-container (min-height: 400px) {
|
|
|
|
|
.d2h-file-diff { max-height: 97cqh; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@container diff-container (min-height: 550px) {
|
|
|
|
|
.d2h-file-diff { max-height: 98cqh; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@container diff-container (min-height: 1000px) {
|
|
|
|
|
.d2h-file-diff { max-height: 99cqh; }
|
|
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
/* Empty placeholder */
|
|
|
|
|
.d2h-emptyplaceholder {
|
|
|
|
|
background-color: var(--background-secondary-alt) !important;
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-12-04 23:04:20 +00:00
|
|
|
.d2h-code-side-linenumber {
|
|
|
|
|
position: relative;
|
|
|
|
|
display: table-cell;
|
|
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
/* Code side backgrounds for side-by-side view - only override context lines */
|
|
|
|
|
.d2h-code-side-linenumber.d2h-cntx,
|
|
|
|
|
.d2h-code-side-line.d2h-cntx {
|
|
|
|
|
background-color: var(--background-primary) !important;
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
/* Fix transparent backgrounds on insertion/deletion line numbers */
|
|
|
|
|
/* Dark mode styles - side-by-side view */
|
|
|
|
|
.theme-dark .d2h-code-side-linenumber.d2h-ins {
|
|
|
|
|
background-color: #1e3a1e !important; /* Dark green - solid color */
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
.theme-dark .d2h-code-side-linenumber.d2h-del {
|
|
|
|
|
background-color: #3a1e1e !important; /* Dark red - solid color */
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
/* Dark mode styles - inline view */
|
|
|
|
|
.theme-dark .d2h-code-linenumber.d2h-ins {
|
|
|
|
|
background-color: #1e3a1e !important; /* Dark green - solid color */
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
.theme-dark .d2h-code-linenumber.d2h-del {
|
|
|
|
|
background-color: #3a1e1e !important; /* Dark red - solid color */
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
/* Light mode styles - side-by-side view */
|
|
|
|
|
.theme-light .d2h-code-side-linenumber.d2h-ins {
|
|
|
|
|
background-color: #c8e6c9 !important; /* Light green with better contrast */
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
.theme-light .d2h-code-side-linenumber.d2h-del {
|
|
|
|
|
background-color: #ffcdd2 !important; /* Light red with better contrast */
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
/* Light mode styles - inline view */
|
|
|
|
|
.theme-light .d2h-code-linenumber.d2h-ins {
|
|
|
|
|
background-color: #c8e6c9 !important; /* Light green with better contrast */
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
.theme-light .d2h-code-linenumber.d2h-del {
|
|
|
|
|
background-color: #ffcdd2 !important; /* Light red with better contrast */
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
/* Tags and labels */
|
|
|
|
|
.d2h-tag {
|
|
|
|
|
background-color: var(--background-secondary) !important;
|
|
|
|
|
border-color: var(--background-modifier-border) !important;
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
/* File list wrapper */
|
2025-11-24 21:29:54 +00:00
|
|
|
.d2h-file-list-wrapper {
|
2025-11-27 12:39:08 +00:00
|
|
|
background-color: var(--background-primary) !important;
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
/* File list header */
|
2025-11-24 21:29:54 +00:00
|
|
|
.d2h-file-list-header {
|
2025-11-27 12:39:08 +00:00
|
|
|
background-color: var(--background-primary-alt) !important;
|
|
|
|
|
border-color: var(--background-modifier-border) !important;
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
/* File list line */
|
2025-11-24 21:29:54 +00:00
|
|
|
.d2h-file-list-line {
|
2025-11-27 12:39:08 +00:00
|
|
|
background-color: var(--background-primary) !important;
|
|
|
|
|
border-color: var(--background-modifier-border) !important;
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
/* File switch container */
|
|
|
|
|
.d2h-file-switch {
|
|
|
|
|
background-color: var(--background-primary-alt) !important;
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
/* Toolbar */
|
|
|
|
|
.d2h-file-diff-toolbar {
|
|
|
|
|
background-color: var(--background-secondary) !important;
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
.d2h-file-header {
|
|
|
|
|
padding: 0 !important;
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
.d2h-file-name-wrapper {
|
|
|
|
|
padding-left: 8px !important;
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
/* Text colors */
|
|
|
|
|
.d2h-file-header,
|
|
|
|
|
.d2h-file-name,
|
|
|
|
|
.d2h-file-stats,
|
|
|
|
|
.d2h-code-linenumber,
|
|
|
|
|
.d2h-info {
|
|
|
|
|
color: var(--text-normal) !important;
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-12-04 23:04:20 +00:00
|
|
|
.d2h-diff-table {
|
|
|
|
|
position: relative;
|
|
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
/* Light mode syntax highlighting overrides for better visibility */
|
|
|
|
|
.theme-light .d2h-code-side-line {
|
|
|
|
|
color: var(--text-normal) !important;
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
/* Force base text color for all code content in light mode */
|
|
|
|
|
.theme-light .d2h-code-line-ctn,
|
|
|
|
|
.theme-light .d2h-code-line-ctn * {
|
|
|
|
|
color: var(--text-normal) !important;
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
/* Override Monokai theme colors in light mode for better contrast */
|
|
|
|
|
.theme-light .hljs-comment,
|
|
|
|
|
.theme-light .hljs-quote {
|
|
|
|
|
color: #5c6370 !important; /* Medium gray for comments */
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
.theme-light .hljs-keyword,
|
|
|
|
|
.theme-light .hljs-selector-tag,
|
|
|
|
|
.theme-light .hljs-literal,
|
|
|
|
|
.theme-light .hljs-type {
|
|
|
|
|
color: #a626a4 !important; /* Purple for keywords */
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
.theme-light .hljs-string,
|
|
|
|
|
.theme-light .hljs-doctag {
|
|
|
|
|
color: #50a14f !important; /* Green for strings */
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
.theme-light .hljs-title,
|
|
|
|
|
.theme-light .hljs-section,
|
|
|
|
|
.theme-light .hljs-selector-id {
|
|
|
|
|
color: #4078f2 !important; /* Blue for titles/functions */
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
.theme-light .hljs-subst,
|
|
|
|
|
.theme-light .hljs-tag,
|
|
|
|
|
.theme-light .hljs-name,
|
|
|
|
|
.theme-light .hljs-attr,
|
|
|
|
|
.theme-light .hljs-attribute {
|
|
|
|
|
color: #e45649 !important; /* Red for tags/attributes */
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
.theme-light .hljs-variable,
|
|
|
|
|
.theme-light .hljs-template-variable {
|
|
|
|
|
color: #986801 !important; /* Orange for variables */
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
.theme-light .hljs-number,
|
|
|
|
|
.theme-light .hljs-built_in,
|
|
|
|
|
.theme-light .hljs-builtin-name,
|
|
|
|
|
.theme-light .hljs-class .hljs-title {
|
|
|
|
|
color: #c18401 !important; /* Gold for numbers/built-ins */
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
.theme-light .hljs-meta,
|
|
|
|
|
.theme-light .hljs-meta-keyword {
|
|
|
|
|
color: #a626a4 !important; /* Purple for meta */
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
.theme-light .hljs-symbol,
|
|
|
|
|
.theme-light .hljs-bullet,
|
|
|
|
|
.theme-light .hljs-link {
|
|
|
|
|
color: #0184bc !important; /* Cyan for symbols */
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
/* Ensure deletion and insertion text is visible */
|
|
|
|
|
.theme-light .d2h-code-line.d2h-del .hljs {
|
|
|
|
|
color: #24292e !important; /* Dark text on light red background */
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|
|
|
|
|
|
2025-11-27 12:39:08 +00:00
|
|
|
.theme-light .d2h-code-line.d2h-ins .hljs {
|
|
|
|
|
color: #24292e !important; /* Dark text on light green background */
|
2025-11-24 21:29:54 +00:00
|
|
|
}
|