/* ================================================================================ GitHubDHC Theme - GitHub Dark High Contrast for Obsidian Author: Scott Kirvan Based on: GitHub's Primer Design System Source: @primer/primitives - Dark High Contrast theme This theme provides an accurate implementation of GitHub's Dark High Contrast color scheme for Obsidian, with support for colorblind variants and the Kanban plugin. ================================================================================ */ /* @settings name: GitHubDHC theme settings id: id settings: - # Colorblind id: colorblind title: Colorblind variants type: heading level: 1 collapsed: true - id: colorblind_protan-deutan title: Protanopia & Deuteranopia type: class-toggle default: off - id: colorblind_tritan title: Tritanopia type: class-toggle default: off - # Callout Settings id: callout title: Callouts type: heading level: 1 collapsed: true - id: callout-on title: GitHub callout style type: class-toggle default: on - # Headers Settings id: headers title: Headers colors type: heading level: 1 collapsed: true - # All Headers id: all-headers title: All headers type: heading level: 3 collapsed: true - id: headers-one-color title: All headers are the same color type: class-toggle default: on - id: h-color-theme title: Header color type: variable-themed-color opacity: false format: hex default-light: '#24292f' default-dark: '#ffffff' - # Particular Headers id: particular headers title: Particular headers description: This settings won't work if `All headers are the same color` is ON type: heading level: 3 collapsed: true - id: h1-color-theme title: h1 color type: variable-themed-color opacity: false format: hex default-light: '#24292f' default-dark: '#ffffff' - id: h2-color-theme title: h2 color type: variable-themed-color opacity: false format: hex default-light: '#24292f' default-dark: '#ffffff' - id: h3-color-theme title: h3 color type: variable-themed-color opacity: false format: hex default-light: '#24292f' default-dark: '#ffffff' - id: h4-color-theme title: h4 color type: variable-themed-color opacity: false format: hex default-light: '#24292f' default-dark: '#ffffff' - id: h5-color-theme title: h5 color type: variable-themed-color opacity: false format: hex default-light: '#24292f' default-dark: '#ffffff' - id: h6-color-theme title: h6 color type: variable-themed-color opacity: false format: hex default-light: '#24292f' default-dark: '#ffffff' - # Kanban Settings id: kanban title: Kanban type: heading level: 1 collapsed: true - id: kanban-variant title: Kanban variant description: Variations of Kanban styles type: class-select allowEmpty: false default: kanban-full options: - label: GitHub projects style value: kanban-full - label: Minimal style value: kanban-on - label: Disable styles value: kanban-off - id: kanban-same-height-cards title: Minimal height for cards description: All cards will have the same initial height type: class-toggle default: on - id: kanban-full-height-column title: Full height lists description: type: class-toggle default: on */ /* ================================================================================ BASE OBSIDIAN VARIABLES These variables override Obsidian's defaults to match GitHub's design system. They are theme-agnostic and work for both light and dark modes. ================================================================================ */ body { /*───────── Fonts ──────────*/ --font-sans: -apple-system BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; --font-mono: 'DM Mono', 'Fira Code', Courier, monospace; --font-interface-theme: var(--font-sans); --font-text-theme: var(--font-sans); --font-monospace-theme: var(--font-mono); /* Animations */ --anim-duration-none: 0; --anim-duration-superfast: 70ms; --anim-duration-fast: 140ms; --anim-duration-moderate: 300ms; --anim-duration-slow: 560ms; --anim-motion-smooth: cubic-bezier(0.45, 0.05, 0.55, 0.95); --anim-motion-delay: cubic-bezier(0.65, 0.05, 0.36, 1); --anim-motion-jumpy: cubic-bezier(0.68, -0.55, 0.27, 1.55); --anim-motion-swing: cubic-bezier(0, 0.55, 0.45, 1); /* Blockquotes */ --blockquote-border-thickness: .25em; --blockquote-border-color: var(--color-base-50); --blockquote-font-style: normal; --blockquote-color: inherit; --blockquote-background-color: transparent; /* Bold */ --bold-weight: var(--font-semibold); --bold-color: inherit; /* Borders */ --border-width: 1px; /* Buttons */ --button-radius: var(--input-radius); /* Callouts */ --callout-border-width: 0px; --callout-border-opacity: 0.25; --callout-padding: var(--size-4-3) var(--size-4-3) var(--size-4-3) var(--size-4-6); --callout-radius: var(--radius-s); --callout-blend-mode: var(--highlight-mix-blend-mode); --callout-title-padding: 0; --callout-title-size: inherit; --callout-content-padding: 0; /* Checkboxes */ --checkbox-radius: var(--radius-s); --checkbox-size: 15px; --checkbox-marker-color: var(--background-primary); --checkbox-color: var(--interactive-accent); --checkbox-color-hover: var(--interactive-accent-hover); --checkbox-border-color: var(--text-faint); --checkbox-border-color-hover: var(--text-muted); --checklist-done-decoration: line-through; --checklist-done-color: var(--text-muted); /* Code */ --code-size: var(--font-smaller); --code-background: var(--color-base-35); --code-normal: var(--color-base-100); --code-comment: var(--text-faint); --code-function: var(--color-orange); --code-important: var(--color-orange); --code-keyword: var(--color-red); --code-property: var(--color-blue); --code-punctuation: var(--text-muted); --code-string: var(--color-cyan); --code-tag: var(--color-red); --code-value: var(--color-purple); /* Collapse icons */ --collapse-icon-color: var(--text-faint); --collapse-icon-color-collapsed: var(--text-accent); /* Cursor */ --cursor: default; --cursor-link: pointer; /* Dialogs - e.g. small modals, confirmations */ --dialog-width: 560px; --dialog-max-width: 80vw; --dialog-max-height: 85vh; /* Dividers — between panes */ --divider-color: var(--background-modifier-border); --divider-color-hover: var(--interactive-accent); --divider-width: 1px; --divider-width-hover: 3px; --divider-vertical-height: calc(100% - var(--header-height)); /* Dragging */ --drag-ghost-background: rgba(0, 0, 0, 0.85); --drag-ghost-text-color: #fff; /* Embeds */ --embed-background: inherit; --embed-border-left: 2px solid var(--interactive-accent); --embed-border-right: none; --embed-border-top: none; --embed-border-bottom: none; --embed-padding: 0 0 0 var(--size-4-6); --embed-font-style: inherit; /* Blocks */ --embed-block-shadow-hover: 0 0 0 1px var(--background-modifier-border), inset 0 0 0 1px var(--background-modifier-border); /* File layout */ --file-line-width: 700px; --file-folding-offset: 24px; --file-margins: var(--size-4-8); --file-header-font-size: var(--font-ui-small); --file-header-font-weight: 400; --file-header-border: var(--border-width) solid transparent; --file-header-justify: center; /* Relative font sizes */ --font-smallest: 0.8em; --font-smaller: 0.875em; --font-small: 0.933em; /* UI font sizes */ --font-ui-smaller: 12px; --font-ui-small: 13px; --font-ui-medium: 15px; --font-ui-large: 20px; /* Font weights */ --font-thin: 100; --font-extralight: 200; --font-light: 300; --font-normal: 400; --font-medium: 500; --font-semibold: 600; --font-bold: 700; --font-extrabold: 800; --font-black: 900; /* Footnotes */ --footnote-size: var(--font-smaller); /* Graphs */ --graph-controls-width: 240px; --graph-text: var(--text-normal); --graph-line: var(--color-base-35, var(--background-modifier-border-focus)); --graph-node: var(--text-muted); --graph-node-unresolved: var(--text-faint); --graph-node-focused: var(--text-accent); --graph-node-tag: var(--color-green); --graph-node-attachment: var(--color-yellow); /* Headings */ --heading-formatting: var(--text-faint); --h1-color: var(--h1-color-theme); --h2-color: var(--h2-color-theme); --h3-color: var(--h3-color-theme); --h4-color: var(--h4-color-theme); --h5-color: var(--h5-color-theme); --h6-color: var(--h6-color-theme); --h1-font: inherit; --h2-font: inherit; --h3-font: inherit; --h4-font: inherit; --h5-font: inherit; --h6-font: inherit; --h1-line-height: 1.2; --h2-line-height: 1.2; --h3-line-height: 1.3; --h4-line-height: 1.4; --h5-line-height: var(--line-height-normal); --h6-line-height: var(--line-height-normal); --h1-size: 2em; --h2-size: 1.5em; --h3-size: 1.25em; --h4-size: 1em; --h5-size: .875em; --h6-size: .85em; --h1-style: normal; --h2-style: normal; --h3-style: normal; --h4-style: normal; --h5-style: normal; --h6-style: normal; --h1-variant: normal; --h2-variant: normal; --h3-variant: normal; --h4-variant: normal; --h5-variant: normal; --h6-variant: normal; --h1-weight: 600; --h2-weight: 600; --h3-weight: 600; --h4-weight: 600; --h5-weight: 600; --h6-weight: 600; /* View header */ --header-height: 40px; /* Horizontal rules */ --hr-color: var(--color-base-50); --hr-thickness: .25em; /* Icons */ --icon-size: var(--icon-m); --icon-stroke: var(--icon-m-stroke-width); --icon-xs: 14px; --icon-s: 16px; --icon-m: 18px; --icon-l: 18px; --icon-xs-stroke-width: 2px; --icon-s-stroke-width: 2px; --icon-m-stroke-width: 1.75px; --icon-l-stroke-width: 1.75px; --icon-color: var(--text-muted); --icon-color-hover: var(--text-muted); --icon-color-active: var(--text-accent); --icon-color-focused: var(--text-normal); --icon-opacity: 0.85; --icon-opacity-hover: 1; --icon-opacity-active: 1; --clickable-icon-radius: var(--radius-s); /* Indentation guide */ --indentation-guide-width: 1px; --indentation-guide-color: rgba(var(--mono-rgb-100), 0.12); --indentation-guide-color-active: rgba(var(--mono-rgb-100), 0.3); /* Inline title */ --inline-title-color: var(--h1-color); --inline-title-font: var(--h1-font); --inline-title-line-height: var(--h1-line-height); --inline-title-size: var(--h1-size); --inline-title-style: var(--h1-style); --inline-title-variant: var(--h1-variant); --inline-title-weight: var(--h1-weight); /* Inputs */ --input-height: 30px; --input-radius: 5px; --input-font-weight: var(--font-normal); --input-border-width: 1px; /* Italic */ --italic-color: inherit; /* Z-index */ --layer-cover: 5; --layer-sidedock: 10; --layer-status-bar: 15; --layer-popover: 30; --layer-slides: 45; --layer-modal: 50; --layer-notice: 60; --layer-menu: 65; --layer-tooltip: 70; --layer-dragged-item: 80; /* Line heights */ --line-height-normal: 1.5; --line-height-tight: 1.3; /* Links */ --link-color: var(--text-accent); --link-color-hover: var(--text-accent-hover); --link-decoration: none; --link-decoration-hover: underline; --link-decoration-thickness: auto; --link-external-color: var(--text-accent); --link-external-color-hover: var(--text-accent-hover); --link-external-decoration: none; --link-external-decoration-hover: underline; --link-external-filter: none; --link-unresolved-color: var(--text-accent); --link-unresolved-opacity: 0.7; --link-unresolved-filter: none; --link-unresolved-decoration-style: solid; --link-unresolved-decoration-color: hsla(var(--interactive-accent-hsl), 0.3); /* Lists */ --list-indent: 2em; --list-spacing: 0.075em; --list-marker-color: var(--text-normal); --list-marker-color-hover: var(--text-muted); --list-marker-color-collapsed: var(--text-accent); --list-bullet-border: none; --list-bullet-radius: 50%; --list-bullet-size: 5px; --list-bullet-transform: none; /* File navigator */ --nav-item-size: var(--font-ui-small); --nav-item-color: var(--text-muted); --nav-item-color-hover: var(--text-normal); --nav-item-color-active: var(--text-normal); --nav-item-color-selected: var(--text-normal); --nav-item-color-highlighted: var(--text-accent-hover); --nav-item-background-hover: var(--background-modifier-hover); --nav-item-background-active: var(--background-modifier-hover); --nav-item-background-selected: hsla(var(--color-accent-hsl), 0.2); --nav-item-padding: var(--size-4-1) var(--size-4-2); --nav-item-weight: inherit; --nav-item-weight-hover: inherit; --nav-item-weight-active: inherit; --nav-item-white-space: nowrap; --nav-indentation-guide-width: var(--indentation-guide-width); --nav-indentation-guide-color: var(--indentation-guide-color); --nav-collapse-icon-color: var(--collapse-icon-color); --nav-collapse-icon-color-collapsed: var(--text-faint); /* Modals - e.g. settings, community themes, community plugins */ --modal-background: var(--background-primary); --modal-width: 90vw; --modal-height: 85vh; --modal-max-width: 1100px; --modal-max-height: 1000px; --modal-max-width-narrow: 800px; --modal-border-width: var(--border-width); --modal-border-color: var(--color-base-30, var(--background-modifier-border-focus)); --modal-radius: var(--radius-l); --modal-community-sidebar-width: 280px; /* Popovers - file previews */ --popover-width: 450px; --popover-height: 400px; --popover-max-height: 70vh; --popover-pdf-width: 600px; --popover-pdf-height: 800px; --popover-font-size: var(--font-text-size); /* Prompts - e.g. quick switcher, command palette */ --prompt-width: 700px; --prompt-max-width: 80vw; --prompt-max-height: 70vh; --prompt-border-width: var(--border-width); --prompt-border-color: var(--color-base-40, var(--background-modifier-border-focus)); /* Radiuses */ --radius-s: 4px; --radius-m: 8px; --radius-l: 10px; --radius-xl: 16px; /* Ribbon */ --ribbon-background: var(--background-secondary); --ribbon-background-collapsed: var(--background-primary); --ribbon-width: 44px; --ribbon-padding: var(--size-4-2) var(--size-4-1) var(--size-4-3); /* Scrollbars */ --scrollbar-active-thumb-bg: rgba(var(--mono-rgb-100), 0.2); --scrollbar-bg: rgba(var(--mono-rgb-100), 0.05); --scrollbar-thumb-bg: rgba(var(--mono-rgb-100), 0.1); /* Search */ --search-clear-button-color: var(--text-muted); --search-clear-button-size: 13px; --search-icon-color: var(--text-muted); --search-icon-size: 18px; --search-result-background: var(--background-primary); /* Layout sizing - for padding and margins */ --size-2-1: 2px; --size-2-2: 4px; --size-2-3: 6px; --size-4-1: 4px; --size-4-2: 8px; --size-4-3: 12px; --size-4-4: 16px; --size-4-5: 20px; --size-4-6: 24px; --size-4-8: 32px; --size-4-9: 36px; --size-4-12: 48px; --size-4-16: 64px; --size-4-18: 72px; /* Sidebar */ --sidebar-markdown-font-size: calc(var(--font-text-size) * 0.9); --sidebar-tab-text-display: none; /* Sliders */ --slider-thumb-border-width: 1px; --slider-thumb-border-color: var(--background-modifier-border-hover); --slider-thumb-height: 18px; --slider-thumb-width: 18px; --slider-thumb-y: -6px; --slider-thumb-radius: 50%; --slider-s-thumb-size: 15px; --slider-s-thumb-position: -5px; --slider-track-background: var(--background-modifier-border); --slider-track-height: 3px; /* Status bar */ --status-bar-background: var(--background-secondary); --status-bar-border-color: var(--divider-color); --status-bar-border-width: 1px 0 0 1px; --status-bar-font-size: var(--font-ui-smaller); --status-bar-text-color: var(--text-muted); --status-bar-position: fixed; --status-bar-radius: var(--radius-m) 0 0 0; /* Swatch for color inputs */ --swatch-radius: 14px; --swatch-height: 24px; --swatch-width: 24px; --swatch-shadow: inset 0 0 0 1px rgba(var(--mono-rgb-100), 0.15); /* Tabs */ --tab-background-active: var(--background-primary); --tab-text-color: var(--text-faint); --tab-text-color-focused: var(--text-muted); --tab-text-color-focused-active: var(--text-normal); --tab-font-size: var(--font-ui-small); --tab-font-weight: inherit; --tab-container-background: var(--background-secondary); --tab-divider-color: var(--background-modifier-border-hover); --tab-outline-color: var(--divider-color); --tab-outline-width: 1px; --tab-curve: 6px; --tab-radius: var(--radius-s); --tab-radius-active: 6px 6px 0 0; --tab-width: 200px; --tab-max-width: 320px; /* Stacked tabs */ --tab-stacked-pane-width: 700px; --tab-stacked-header-width: var(--header-height); --tab-stacked-font-size: var(--font-ui-small); --tab-stacked-font-weight: 400; --tab-stacked-text-align: left; --tab-stacked-text-transform: rotate(0deg); --tab-stacked-text-writing-mode: vertical-lr; --tab-stacked-shadow: -8px 0 8px 0 rgba(0, 0, 0, 0.05); /* Tables */ --table-background: transparent; --table-border-width: 1px; --table-border-color: var(--background-modifier-border); --table-white-space: normal; --table-header-background: var(--table-background); --table-header-background-hover: inherit; --table-header-border-width: var(--table-border-width); --table-header-border-color: var(--table-border-color); --table-header-font: inherit; --table-header-size: inherit; --table-header-weight: var(--font-semibold); --table-header-color: var(--text-normal); --table-text-size: inherit; --table-text-color: inherit; --table-column-max-width: none; --table-column-alt-background: var(--table-background); --table-column-first-border-width: var(--table-border-width); --table-column-last-border-width: var(--table-border-width); --table-row-background-hover: var(--table-background); --table-row-alt-background: var(--table-background); --table-row-last-border-width: var(--table-border-width); /* Tags */ --tag-size: var(--font-smaller); --tag-color: var(--text-accent); --tag-color-hover: var(--text-accent); --tag-decoration: none; --tag-decoration-hover: none; --tag-background: hsla(var(--interactive-accent-hsl), 0.1); --tag-background-hover: hsla(var(--interactive-accent-hsl), 0.2); --tag-border-color: hsla(var(--interactive-accent-hsl), 0.15); --tag-border-color-hover: hsla(var(--interactive-accent-hsl), 0.15); --tag-border-width: 0px; --tag-padding-x: 0.65em; --tag-padding-y: 0.25em; --tag-radius: 2em; /* Window frame */ --titlebar-background: var(--background-secondary); --titlebar-background-focused: var(--background-secondary-alt); --titlebar-border-width: 0px; --titlebar-border-color: var(--background-modifier-border); --titlebar-text-color: var(--text-muted); --titlebar-text-color-focused: var(--text-normal); --titlebar-text-color-highlighted: var(--text-accent-hover); --titlebar-text-weight: var(--font-bold); /* Toggles */ --toggle-border-width: 2px; --toggle-width: 40px; --toggle-radius: 18px; --toggle-thumb-color: white; --toggle-thumb-radius: 18px; --toggle-thumb-height: 18px; --toggle-thumb-width: 18px; --toggle-s-border-width: 2px; --toggle-s-width: 34px; --toggle-s-thumb-height: 15px; --toggle-s-thumb-width: 15px; /* Vault name */ --vault-name-font-size: var(--font-ui-small); --vault-name-font-weight: var(--font-medium); --vault-name-color: var(--text-normal); /* Workspace */ --workspace-background-translucent: rgba(var(--mono-rgb-0), 0.6); /*───────── Color Mappings ──────────*/ /* These map Obsidian's color variables to our base color system */ /* Accent HSL values */ --accent-h: var(--accent-h-theme); --accent-s: var(--accent-s-theme); --accent-l: var(--accent-l-theme); /* Backgrounds */ --background-primary: var(--color-base-00); --background-primary-alt: var(--color-base-10); --background-secondary: var(--color-base-00); --background-modifier-hover: rgba(var(--rgb-hover), var(--background-modifier-hover-alpha)); --background-modifier-active-hover: hsla(var(--interactive-accent-hsl), 0.15); --background-modifier-border: var(--color-base-30); --background-modifier-border-hover: var(--color-base-30); --background-modifier-border-focus: var(--color-accent); --background-modifier-error-rgb: var(--color-red-rgb); --background-modifier-error: var(--color-red); --background-modifier-error-hover: var(--color-red); --background-modifier-success-rgb: var(--color-green-rgb); --background-modifier-success: var(--color-green); --background-modifier-message: rgba(0, 0, 0, 0.9); /* Inputs */ --background-modifier-form-field: var(--color-base-25); /* Text */ --text-normal: var(--color-base-100); --text-muted: var(--color-base-70); --text-faint: var(--color-base-50); --text-on-accent: black; --text-error: var(--color-red); --text-success: var(--color-green); --text-selection: hsla(var(--color-accent-hsl), 0.2); --text-accent: var(--color-accent); --text-accent-hover: var(--color-accent-2); --interactive-normal: var(--color-base-35); /* Secondary button background (base-35 = #3d444d) */ --interactive-hover: var(--color-base-50); /* Secondary button hover (base-50 = #7a828e) */ --interactive-accent-hsl: var(--color-accent-hsl); --interactive-accent: var(--color-accent-1); --interactive-accent-hover: var(--color-accent-2); } /* ================================================================================ DARK THEME - GitHub Dark High Contrast Official colors from @primer/primitives/dist/css/functional/themes/dark-high-contrast.css Key characteristics: - Darkest background (#010409) for maximum contrast - Pure white text (#ffffff) for readability - Light borders (#b7bdc8) for clear definition - Vibrant accent colors for syntax and UI elements ================================================================================ */ .theme-dark { color-scheme: dark; --highlight-mix-blend-mode: lighten; --mono-rgb-0: 0, 0, 0; --mono-rgb-100: 255, 255, 255; /* GitHub Dark High Contrast Colors - Official Primer Primitives */ /* Source: @primer/primitives/dist/css/functional/themes/dark-high-contrast.css */ /* Backgrounds */ --color-base-00: #010409; /* bgColor-default - main canvas */ --color-base-10: #151b23; /* bgColor-muted - secondary areas */ --color-base-20: #151b23; /* bgColor-muted variant */ --color-base-25: #010409; /* bgColor-inset - for form fields (same as bgColor-default) */ --color-base-30: #b7bdc8; /* borderColor-default */ --color-base-35: #3d444d; /* Code block background - darker like GitHub */ --code-background: #161b22; /* Table alternating row background */ --table-row-alt-background: #151b23; /* bgColor-emphasis */ --color-base-40: #b7bdc8; /* border emphasis */ --color-base-50: #7a828e; /* faint borders/text */ --color-base-60: #999; /* unused - legacy */ --color-base-70: #b7bdc8; /* fgColor-muted */ --color-base-100: #ffffff; /* fgColor-default - pure white for max contrast */ /* Hover states */ --rgb-hover: 183, 189, 200; /* based on --color-base-30 */ /* Semantic colors - ANSI terminal colors from GitHub DHC */ --color-red-rgb: 255, 148, 146; --color-red: #ff9492; /* color-ansi-red / fgColor-danger */ --color-green-rgb: 43, 216, 83; --color-green: #2bd853; /* color-ansi-green / fgColor-success */ --color-orange: #ffa657; /* legacy - keeping for compatibility */ --color-yellow: #f0b72f; /* color-ansi-yellow */ --color-cyan: #a5d6ff; /* legacy cyan */ --color-blue: #71b7ff; /* color-ansi-blue */ --color-purple: #d2a8ff; /* legacy purple */ --color-pink: #f778ba; /* legacy pink */ --color-white: #ffffff; /* Accent colors - using neutral grey for high contrast */ --accent-h-theme: 220; /* neutral grey-blue hue */ --accent-s-theme: 13%; /* low saturation for neutral grey */ --accent-l-theme: 70%; /* light grey */ --color-accent-hsl: var(--accent-h), var(--accent-s), var(--accent-l); --color-accent: #b7bdc8; /* borderColor-default - neutral light grey */ --color-accent-1: #9ea7b3; /* slightly darker grey */ --color-accent-2: #d1d9e0; /* lighter grey */ /* UI Modifiers */ --background-secondary-alt: var(--color-base-25); --background-modifier-box-shadow: rgba(0, 0, 0, 0.3); --background-modifier-cover: rgba(10, 10, 10, 0.4); --text-highlight-bg: rgba(255, 208, 0, 0.4); --text-highlight-bg-active: rgba(255, 128, 0, 0.4); --text-selection: hsla(var(--interactive-accent-hsl), 0.4); --input-shadow: inset 0 0 0 1px #f0f6fc1a; --input-shadow-hover: inset 0 0 0 1px var(--color-base-70); --shadow-s: none; --shadow-l: none; /* Code and Headers */ --inline-code-background: rgba(158, 167, 179, 0.4); --h-color-theme: var(--color-white); --h1-color-theme: var(--color-white); --h2-color-theme: var(--color-white); --h3-color-theme: var(--color-white); --h4-color-theme: var(--color-white); --h5-color-theme: var(--color-white); --h6-color-theme: var(--color-white); /* Buttons - GitHub DHC green primary button */ --background-modifier-hover-alpha: 0.12; --color-btn-primary-bg: #09b43a; /* GitHub DHC success/primary button */ --color-btn-primary-hover-bg: #0c8e33; /* GitHub DHC success button hover */ /* Secondary buttons - Override for dark theme */ --interactive-normal: #3d444d; /* bgColor-neutral-muted - secondary button background */ --interactive-hover: #6e7781; /* Lighter grey for hover - GitHub DHC hover color */ /* Links - Override to use blue instead of grey accent */ --link-color: #71b7ff; /* GitHub DHC blue for links */ --link-color-hover: #a5d6ff; /* Lighter blue on hover */ --link-external-color: #71b7ff; --link-external-color-hover: #a5d6ff; --link-unresolved-color: #71b7ff; --text-accent: #71b7ff; /* Override text-accent for links */ --text-accent-hover: #a5d6ff; /* Toggle switches - different colors for on/off states */ --toggle-background-color-off: var(--interactive-normal); /* Grey when off */ --toggle-background-color: var(--interactive-accent); /* Blue when on */ --toggle-border-color: var(--background-modifier-border); /* Kanban colors */ --kanban-background: var(--background-primary); --kanban-lane-background: var(--background-secondary-alt); --kanban-item-background: var(--background-primary-alt); --kanban-lane-border: var(--color-base-35); --kanban-lane-count: var(--color-base-35); --kanban-options-btn: var(--color-base-30); } /* ================================================================================ MOBILE OVERRIDES - Dark Theme Adjustments for mobile devices to improve touch interactions and readability ================================================================================ */ .is-mobile.theme-dark { --color-base-00: #010409; /* Match DHC bgColor-default */ --color-base-10: #151b23; /* Match DHC bgColor-muted */ --color-base-20: #151b23; /* Match DHC bgColor-muted */ --tag-background: hsla(var(--interactive-accent-hsl), 0.2); --modal-background: var(--background-secondary); --search-result-background: var(--background-secondary); --background-modifier-form-field: var(--color-base-25); /* Use base-25 (black) not border color */ --background-modifier-cover: rgba(0, 0, 0, 0.5); --background-modifier-hover: rgba(var(--mono-rgb-100), 0.15); --settings-home-background: var(--background-primary); /* Canvas - GitHub Dark High Contrast palette */ --canvas-background: var(--color-base-00); --canvas-dot-pattern: #3d444d; --canvas-card-label-color: var(--color-base-70); /* RGB triplets required — Obsidian uses rgba(var(--canvas-color-N), alpha) */ --canvas-color-1: 255, 148, 146; /* #ff9492 red */ --canvas-color-2: 255, 166, 87; /* #ffa657 orange */ --canvas-color-3: 240, 183, 47; /* #f0b72f yellow */ --canvas-color-4: 43, 216, 83; /* #2bd853 green */ --canvas-color-5: 165, 214, 255; /* #a5d6ff cyan */ --canvas-color-6: 210, 168, 255; /* #d2a8ff purple */ } /* ================================================================================ LIGHT THEME - GitHub Light Default Official colors from @primer/primitives/dist/css/functional/themes/light.css Key characteristics: - Clean white background (#ffffff) - Dark text (#1f2328) for readability - Subtle gray borders (#d1d9e0) - Professional, accessible color palette ================================================================================ */ .theme-light { color-scheme: light; --highlight-mix-blend-mode: darken; --mono-rgb-0: 255, 255, 255; --mono-rgb-100: 0, 0, 0; /* GitHub Light Default Colors - Official Primer Primitives */ /* Source: @primer/primitives/dist/css/functional/themes/light.css */ /* Backgrounds */ --color-base-00: #ffffff; /* bgColor-default - white canvas */ --color-base-05: #fcfcfc; /* subtle variant */ --color-base-10: #f6f8fa; /* bgColor-muted - light gray */ --color-base-20: #f6f8fa; /* bgColor-muted variant */ --color-base-25: #f6f8fa; /* bgColor-inset - for form fields */ --color-base-30: #d1d9e0; /* borderColor-default */ --color-base-35: #afb8c1; /* border emphasis */ --color-base-40: #8c959f; /* mid-tone gray */ --color-base-50: #6e7781; /* subtle text/borders */ --color-base-60: #59636e; /* bgColor-neutral-emphasis */ --color-base-70: #424a53; /* darker muted text */ --color-base-100: #1f2328; /* fgColor-default - primary text */ /* Hover states */ --rgb-hover: 208, 215, 222; /* based on --color-base-30 */ /* Semantic colors - from GitHub Light Default */ --color-red-rgb: 207, 34, 46; --color-red: #cf222e; /* fgColor-danger */ --color-green-rgb: 26, 127, 55; --color-green: #1a7f37; /* fgColor-success */ --color-orange: #bc4c00; /* severe emphasis */ --color-yellow: #9a6700; /* attention emphasis */ --color-cyan: #0969da; /* accent blue */ --color-blue: #0969da; /* fgColor-accent */ --color-purple: #8250df; /* done emphasis */ --color-pink: #bf3989; /* sponsors */ /* Accent colors - GitHub Light Default blue */ --accent-h-theme: 212; /* blue accent */ --accent-s-theme: 92%; --accent-l-theme: 45%; --color-accent-hsl: var(--accent-h), var(--accent-s), var(--accent-l); --color-accent: hsl(var(--accent-h), var(--accent-s), var(--accent-l)); --color-accent-1: hsl(var(--accent-h), var(--accent-s), calc(var(--accent-l) + 2.5%)); --color-accent-2: hsl(var(--accent-h), var(--accent-s), calc(var(--accent-l) + 5%)); /* UI Modifiers */ --background-secondary-alt: var(--color-base-05); --background-modifier-box-shadow: rgba(0, 0, 0, 0.1); --background-modifier-cover: rgba(220, 220, 220, 0.4); --text-highlight-bg: rgba(255, 208, 0, 0.4); --text-highlight-bg-active: rgba(255, 128, 0, 0.4); --input-shadow: inset 0 0 0 1px rgba(27, 31, 36, 0.15); --input-shadow-hover: inset 0 0 0 1px rgba(27, 31, 36, 0.15); --shadow-s: none; --shadow-l: none; /* Code and Headers */ --inline-code-background: rgba(175, 184, 193, 0.2); --h-color-theme: var(--color-base-100); --h1-color-theme: var(--color-base-100); --h2-color-theme: var(--color-base-100); --h3-color-theme: var(--color-base-100); --h4-color-theme: var(--color-base-100); --h5-color-theme: var(--color-base-100); --h6-color-theme: var(--color-base-100); /* Buttons - GitHub Light Default green primary */ --background-modifier-hover-alpha: 0.1; --color-btn-primary-bg: #1f883d; /* GitHub Light success button */ --color-btn-primary-hover-bg: #1a7f37; /* GitHub Light success hover */ /* Secondary buttons - Override for light theme */ --interactive-normal: #f6f8fa; /* Light grey secondary button background */ --interactive-hover: #d1d9e0; /* Slightly darker grey for hover */ /* Links - Override to use blue instead of grey accent */ --link-color: #0969da; /* GitHub Light blue for links */ --link-color-hover: #0550ae; /* Darker blue on hover */ --link-external-color: #0969da; --link-external-color-hover: #0550ae; --link-unresolved-color: #0969da; --text-accent: #0969da; /* Override text-accent for links */ --text-accent-hover: #0550ae; /* Toggle switches - different colors for on/off states */ --toggle-background-color-off: var(--interactive-normal); /* Light grey when off */ --toggle-background-color: var(--interactive-accent); /* Blue when on */ --toggle-border-color: var(--background-modifier-border); /* Kanban colors */ --kanban-background: var(--background-primary); --kanban-lane-background: var(--background-primary-alt); --kanban-item-background: var(--background-primary); --kanban-lane-border: #d8dee4; --kanban-lane-count: rgba(175, 184, 193, 0.2); --kanban-options-btn: var(--background-primary-alt); /* Canvas - GitHub Light Default palette */ --canvas-background: var(--color-base-00); --canvas-dot-pattern: #afb8c1; --canvas-card-label-color: var(--color-base-70); /* RGB triplets required — Obsidian uses rgba(var(--canvas-color-N), alpha) */ --canvas-color-1: 207, 34, 46; /* #cf222e red */ --canvas-color-2: 188, 76, 0; /* #bc4c00 orange */ --canvas-color-3: 154, 103, 0; /* #9a6700 yellow */ --canvas-color-4: 26, 127, 55; /* #1a7f37 green */ --canvas-color-5: 9, 105, 218; /* #0969da cyan */ --canvas-color-6: 130, 80, 223; /* #8250df purple */ } /* ================================================================================ COLORBLIND VARIANTS Accessible color palettes for users with color vision deficiencies. Based on GitHub's colorblind-friendly themes. Variants: - Protanopia & Deuteranopia (red-green colorblindness) - Tritanopia (blue-yellow colorblindness) Note: These override the semantic colors while maintaining contrast ratios ================================================================================ */ /* Protanopia & Deuteranopia - Red-Green Colorblindness */ body.colorblind_protan-deutan.theme-dark { --color-red-rgb: 253, 172, 84; --color-red: #fdac54; --color-green-rgb: 165, 214, 255; --color-green: #a3d6ff; --color-orange: #fdac54; --color-btn-primary-bg: #1f6feb; --color-btn-primary-hover-bg: #388bfd; } body.colorblind_protan-deutan.theme-light { --color-red-rgb: 179, 89, 0; --color-red: #b35900; --color-green-rgb: 33, 139, 255; --color-green: #218bff; --color-orange: #dd7815; --color-btn-primary-bg: #218bff; --color-btn-primary-hover-bg: #0969da; } /* Tritanopia - Blue-Yellow Colorblindness */ body.colorblind_tritan.theme-dark { --color-green-rgb: 165, 214, 255; --color-green: #a5d6ff; --color-orange: #ffa198; --text-highlight-bg: rgba(255, 0, 0, 0.4); --text-highlight-bg-active: rgba(255, 50, 0, 0.4); --color-btn-primary-bg: #1f6feb; --color-btn-primary-hover-bg: #388bfd; } body.colorblind_tritan.theme-light { --color-green-rgb: 12, 181, 79; --color-green: #218bff; --color-orange: #fa4549; --text-highlight-bg: rgba(255, 0, 0, 0.4); --text-highlight-bg-active: rgba(255, 50, 0, 0.4); --color-btn-primary-bg: #218bff; --color-btn-primary-hover-bg: #0969da; } /* ================================================================================ COMPONENT STYLES Custom styling for Obsidian components and markdown elements to match GitHub's rendering. Organized by component type. ================================================================================ */ /* ───────────────────────────────────────────────────────────────────────── TABLES ───────────────────────────────────────────────────────────────────────── */ .markdown-rendered td, .markdown-rendered th { padding: var(--size-2-3) var(--size-4-3); } .markdown-rendered th { text-align: center; } .markdown-rendered tbody tr:nth-child(even) { background-color: var(--table-row-alt-background); } .markdown-rendered tbody tr:nth-child(odd) { background-color: var(--background-primary); } /* ───────────────────────────────────────────────────────────────────────── BUTTONS ───────────────────────────────────────────────────────────────────────── */ /* Base styles for all button types */ button, input[type="button"], input[type="submit"], input[type="reset"] { transition: 80ms cubic-bezier(0.33, 1, 0.68, 1); border: 1px solid var(--background-modifier-border); background-color: var(--interactive-normal); color: var(--text-normal); } button:hover, input[type="button"]:hover, input[type="submit"]:hover, input[type="reset"]:hover { cursor: var(--cursor-link); background-color: var(--interactive-hover); border-color: var(--background-modifier-border-hover); box-shadow: 0 0 0 2px var(--background-modifier-border); } /* Primary buttons (green) */ button.mod-cta, input[type="submit"].mod-cta { background-color: var(--color-btn-primary-bg); color: var(--text-on-accent); border: 1px solid var(--color-btn-primary-bg); } button.mod-cta:hover, input[type="submit"].mod-cta:hover { background-color: var(--color-btn-primary-hover-bg); border-color: var(--color-btn-primary-hover-bg); } /* Secondary buttons - explicit styling for non-cta buttons */ button:not(.mod-cta):not(.mod-warning):not(.mod-destructive), input[type="button"]:not(.mod-cta), input[type="reset"]:not(.mod-cta) { background-color: var(--interactive-normal); color: var(--text-normal); border: 1px solid var(--background-modifier-border); } button:not(.mod-cta):not(.mod-warning):not(.mod-destructive):hover, input[type="button"]:not(.mod-cta):hover, input[type="reset"]:not(.mod-cta):hover { background-color: var(--interactive-hover); border-color: var(--background-modifier-border-hover); box-shadow: 0 0 0 2px var(--background-modifier-border); } /* ───────────────────────────────────────────────────────────────────────── NAVIGATION ITEMS - Settings sidebar, etc. ───────────────────────────────────────────────────────────────────────── */ /* Base styles for navigation items */ .vertical-tab-nav-item { border-left: 6px solid transparent; /* Wider blue bar (was 3px, now 6px) */ margin-left: 4px; /* Space before the blue bar */ padding-left: 6px; /* Space after the blue bar (inside the background) */ font-weight: var(--font-semibold); /* Bold text for all nav items */ transition: background-color 80ms ease-in-out, border-color 80ms ease-in-out; } /* Selected/active navigation item - blue left border */ .vertical-tab-nav-item.is-active { border-left-color: var(--text-accent) !important; background-color: var(--interactive-normal) !important; /* Darker background - same as buttons */ color: var(--text-normal) !important; /* Keep text white */ } /* Hover state for navigation items - lighter background */ .vertical-tab-nav-item:hover { background-color: var(--interactive-hover) !important; } /* ───────────────────────────────────────────────────────────────────────── TOGGLE SWITCHES - On/Off states ───────────────────────────────────────────────────────────────────────── */ /* Toggle switch off state - grey background */ .checkbox-container { background-color: var(--interactive-normal) !important; } /* Toggle switch on state - blue background */ .checkbox-container.is-enabled { background-color: #71b7ff !important; /* GitHub DHC blue - direct color */ } /* Alternative approach using the input checked state */ .checkbox-container:has(input[type="checkbox"]:checked) { background-color: #71b7ff !important; /* GitHub DHC blue - direct color */ } /* Keep the toggle thumb white */ .checkbox-container::after { background-color: white !important; } /* Light theme - use darker blue for toggles */ .theme-light .checkbox-container.is-enabled, .theme-light .checkbox-container:has(input[type="checkbox"]:checked) { background-color: #0969da !important; /* GitHub Light blue */ } /* ───────────────────────────────────────────────────────────────────────── CALLOUTS - GitHub-style alerts ───────────────────────────────────────────────────────────────────────── */ /* Base callout styling - GitHub style */ .callout { border: none; /* No grey border */ border-left: 4px solid var(--callout-color); /* Thick colored left border */ background-color: var(--background-primary) !important; padding: 11px 16px; /* Reduced from 16px to ~11px vertically (30% reduction) */ margin: 11px 0; /* Reduced from 16px to ~11px (30% reduction) */ border-radius: 0; /* No rounded corners - sharp edges */ } /* Title and icon use the callout color */ .callout-title { color: var(--callout-color) !important; font-weight: var(--font-semibold); display: flex; align-items: center; gap: 8px; margin-bottom: 6px; /* Reduced from 8px to 6px */ } .callout-icon { color: var(--callout-color) !important; } /* Content text stays white */ .callout-content { color: var(--text-normal) !important; } /* Specific callout types with BRIGHT GitHub colors */ .callout[data-callout="note"], .callout[data-callout="info"] { --callout-color: #71b7ff; /* Bright blue */ } .callout[data-callout="tip"], .callout[data-callout="success"] { --callout-color: #2bd853; /* Bright green */ } .callout[data-callout="important"] { --callout-color: #d2a8ff; /* Bright purple */ } .callout[data-callout="warning"] { --callout-color: #f0b72f; /* Bright orange/yellow */ } .callout[data-callout="caution"], .callout[data-callout="danger"], .callout[data-callout="error"] { --callout-color: #ff9492; /* Bright red */ } /* Legacy support for callout-on setting */ body.callout-on .callout { border-left: 4px solid var(--callout-color); background-color: var(--background-primary) !important; } body.callout-on .callout-content p { margin: 0.1em 0; } /* ───────────────────────────────────────────────────────────────────────── HEADERS ───────────────────────────────────────────────────────────────────────── */ body.headers-one-color { --h1-color: var(--h-color-theme); --h2-color: var(--h-color-theme); --h3-color: var(--h-color-theme); --h4-color: var(--h-color-theme); --h5-color: var(--h-color-theme); --h6-color: var(--h-color-theme); } /* ───────────────────────────────────────────────────────────────────────── KANBAN PLUGIN INTEGRATION Styles for the Kanban plugin to match GitHub Projects aesthetic. Multiple variants available through Style Settings. ───────────────────────────────────────────────────────────────────────── */ /* Common Kanban Styles */ .kanban-plugin { --lane-width: 348px; } body.theme-light .kanban-plugin__lane-items>div { box-shadow: rgb(140 149 159 / 15%) 0px 3px 6px; } /* Kanban Variant: Same Height Cards */ body.kanban-same-height-cards .kanban-plugin__item-content-wrapper, body.kanban-same-height-cards .kanban-plugin__item-title-wrapper { min-height: 68px; } /* Kanban Variant: Full Height Columns */ body.kanban-full-height-column button.kanban-plugin__new-item-button { align-self: flex-end; } body.kanban-full-height-column .kanban-plugin__item-button-wrapper { flex-grow: 1; display: flex; } body.kanban-full-height-column .kanban-plugin__lane-wrapper { min-height: 100%; } /* Kanban Variant: Minimal Style */ body.kanban-on .kanban-plugin { background-color: var(--kanban-background); } body.kanban-on .kanban-plugin__lane { background-color: var(--kanban-lane-background); border: 1px solid var(--kanban-lane-border); } body.kanban-on .kanban-plugin__lane-title { flex-grow: 0; width: fit-content; } body.kanban-on .kanban-plugin__item-content-wrapper, body.kanban-on .kanban-plugin__item-title-wrapper, body.kanban-on .kanban-plugin__item-metadata-wrapper:not(:empty) { background: var(--kanban-item-background); } body.kanban-on .kanban-plugin__icon>svg { transform: rotate(90deg); } body.kanban-on .kanban-plugin__lane-settings-button-wrapper { margin-left: auto; } body.kanban-on div.kanban-plugin__lane-title-count { background-color: var(--kanban-lane-count); border-radius: 1em; padding: 2px 5px; } body.kanban-on .kanban-plugin__item button.kanban-plugin__item-prefix-button, body.kanban-on .kanban-plugin__item button.kanban-plugin__item-postfix-button, body.kanban-on .kanban-plugin__lane button.kanban-plugin__lane-settings-button { padding: 0 5px; height: 24px; box-shadow: none; } body.kanban-on .kanban-plugin__item button.kanban-plugin__item-prefix-button:hover, body.kanban-on .kanban-plugin__item button.kanban-plugin__item-postfix-button:hover, body.kanban-on .kanban-plugin__lane button.kanban-plugin__lane-settings-button:hover { background-color: var(--kanban-options-btn); cursor: pointer; } body.kanban-on button.kanban-plugin__new-item-button { border: none; justify-content: flex-start; } body.kanban-on .kanban-plugin__new-item-button:hover { color: var(--text-normal); background-color: inherit; box-shadow: none; } body.kanban-on .kanban-plugin__lane-items { padding: 8px 15px; } body.kanban-on .kanban-plugin__item-prefix-button-wrapper input[type=checkbox] { filter: none; } /* Kanban Variant: Full GitHub Projects Style */ body.kanban-full .kanban-plugin { background-color: var(--kanban-background); } /* LANE */ /* Colors */ body.kanban-full .kanban-plugin__lane { background-color: var(--kanban-lane-background); border: 1px solid var(--kanban-lane-border); } /* Grip icon hiding */ body.kanban-full .kanban-plugin__lane-grip { position: absolute; opacity: 0; width: calc(var(--lane-width) - 1em); height: 3em; z-index: 0; margin: 0; cursor: default; } body.kanban-full .kanban-plugin__lane-header-wrapper div { z-index: 1; } /* Header */ body.kanban-full .kanban-plugin__lane-header-wrapper { padding-left: 14px; } body.kanban-full .kanban-plugin__markdown-preview-view { font-size: inherit; } /* Header + Counter */ body.kanban-full .kanban-plugin__lane-title { flex-grow: 0; width: fit-content; font-size: 1em; } /* Counter */ body.kanban-full div.kanban-plugin__lane-title-count { background-color: var(--kanban-lane-count); border-radius: 1em; padding: 2px 5px; } /* Three dot position */ body.kanban-full .kanban-plugin__lane-settings-button-wrapper { margin-left: auto; } /* Cards padding */ body.kanban-full .kanban-plugin__lane-items { padding: 2px 6px; } /* ITEM */ /* Colors */ body.kanban-full .kanban-plugin__item-content-wrapper, body.kanban-full .kanban-plugin__item-title-wrapper, body.kanban-full .kanban-plugin__item-metadata-wrapper:not(:empty) { background: var(--kanban-item-background); } body.kanban-full .kanban-plugin__item { border-color: var(--kanban-lane-border); } /* Between items */ body.kanban-full .kanban-plugin__lane-items>div { margin-bottom: 8px; margin-top: 0; } /* Borders */ body.kanban-full .kanban-plugin__lane-header-wrapper, body.kanban-full .kanban-plugin__item-button-wrapper, body.kanban-full .kanban-plugin__item-form { border: none; } /* Content */ body.kanban-full .kanban-plugin__item-title-wrapper { padding: 12px 12px 12px 0; } body.kanban-full .kanban-plugin__item-title, body.kanban-full .kanban-plugin__item-input-wrapper { padding-left: 12px; } /* Archive/checkbox */ body.kanban-full .kanban-plugin__item-prefix-button-wrapper { align-self: center; margin-left: 5px; } /* Time Date Buttons */ body.kanban-full .kanban-plugin__item-metadata .is-button:hover { cursor: var(--cursor-link); color: var(--text-normal); } /* THREE DOT BUTTON */ /* Rotation */ body.kanban-full .kanban-plugin__icon>svg { transform: rotate(90deg); } /* Size */ body.kanban-full .kanban-plugin__icon { font-size: 1.4em; } /* Item */ body.kanban-full .kanban-plugin__item-postfix-button.clickable-icon { opacity: 0; } body.kanban-full .kanban-plugin__item:hover .kanban-plugin__item-postfix-button.clickable-icon { opacity: 1; } /* ADD A CARD BUTTON */ /* Position */ body.kanban-full .kanban-plugin__new-item-button { border: none; justify-content: flex-start; box-shadow: none; padding-left: 0; } /* + Size */ body.kanban-full .kanban-plugin__item-button-plus { margin-right: 8px; font-size: 1.9em; height: inherit; } /* Hover */ body.kanban-full .kanban-plugin__new-item-button:hover { background-color: inherit; box-shadow: none; color: var(--text-muted); } /* FIXIES */ body.kanban-full .kanban-plugin__item-prefix-button-wrapper input[type=checkbox] { filter: none; margin: 3px; } body.kanban-full .kanban-plugin__markdown-preview-view>div>* { overflow-x: unset; } /* ───────────────────────────────────────────────────────────────────────── FORM ELEMENTS - Inputs, Textareas, Selects ───────────────────────────────────────────────────────────────────────── */ /* Base styles for all form inputs */ input[type='text'], input[type='search'], input[type='email'], input[type='password'], input[type='number'], textarea, select, .dropdown { background-color: var(--background-modifier-form-field); color: var(--text-normal); border: 1px solid var(--background-modifier-border); } /* Input focus states - GitHub style border highlight */ textarea:active, input[type='text']:active, input[type='search']:active, input[type='email']:active, input[type='password']:active, input[type='number']:active, textarea:focus, input[type='text']:focus, input[type='search']:focus, input[type='email']:focus, input[type='password']:focus, input[type='number']:focus, textarea:focus-visible, input[type='text']:focus-visible, input[type='search']:focus-visible, input[type='email']:focus-visible, input[type='password']:focus-visible, input[type='number']:focus-visible { box-shadow: 0 0 0 1px var(--background-modifier-border-focus); } select:focus, .dropdown:focus { box-shadow: 0 0 0 2px var(--background-modifier-border-focus); } /* ───────────────────────────────────────────────────────────────────────── CODE BLOCKS - Inline and Fenced ───────────────────────────────────────────────────────────────────────── */ /* Inline code styling */ .markdown-rendered :not(pre)>code { background-color: var(--inline-code-background); padding: 0.2em 0.4em; border-radius: 6px; color: var(--text-normal); font-size: 85%; } /* ───────────────────────────────────────────────────────────────────────── MARKDOWN HEADERS - GitHub-style with underlines ───────────────────────────────────────────────────────────────────────── */ /* h1/h2 border-bottom & padding-bottom intentionally NOT applied to .cm-header-1/.cm-header-2 (the inline heading-token span inside a CM6 .cm-line): the containing .cm-line.HyperMD-header-1/2 rule below already draws that border for edit mode. Applying it to both produced a visible double underline. */ h1 { display: block; padding-bottom: .3em; border-bottom: 1px solid var(--color-base-50); margin-top: 24px; margin-bottom: 16px; } h2 { display: block; padding-bottom: .3em; border-bottom: 1px solid var(--color-base-50); margin-top: 24px; margin-bottom: 16px; } h3, .cm-header-3 { display: block; padding-bottom: .3em; margin-top: 24px; margin-bottom: 16px; } h4, .cm-header-4 { display: block; padding-bottom: .3em; margin-top: 16px; margin-bottom: 16px; } h5, .cm-header-5 { display: block; padding-bottom: .3em; margin-top: 16px; margin-bottom: 16px; } h6, .cm-header-6 { display: block; padding-bottom: .3em; margin-top: 16px; margin-bottom: 16px; } /* Match GitHub spacing for editing mode. margin-top/bottom removed here: forcing margins on .cm-line via !important changes the element's rendered box height/position independently of what CodeMirror 6 has cached for line layout, which desyncs its coordinate-to- position mapping and breaks click/arrow-key cursor placement on lines below a heading (see #10). */ /* Full-width borders for H1/H2 in editing mode */ .markdown-source-view.mod-cm6 .cm-line.HyperMD-header-1, .markdown-source-view.mod-cm6 .cm-line.HyperMD-header-2 { display: block !important; padding-bottom: .3em !important; border-bottom: 1px solid var(--color-base-50) !important; } /* Keep images inline with headings in editing mode */ .markdown-source-view.mod-cm6 .cm-line.HyperMD-header, .markdown-source-view.mod-cm6 .cm-line.HyperMD-header-1, .markdown-source-view.mod-cm6 .cm-line.HyperMD-header-2, .markdown-source-view.mod-cm6 .cm-line.HyperMD-header-3, .markdown-source-view.mod-cm6 .cm-line.HyperMD-header-4, .markdown-source-view.mod-cm6 .cm-line.HyperMD-header-5, .markdown-source-view.mod-cm6 .cm-line.HyperMD-header-6 { white-space: normal !important; } /* Target all child elements in headers - spans, images, formatting, etc. */ .markdown-source-view.mod-cm6 .HyperMD-header>*, .markdown-source-view.mod-cm6 .HyperMD-header-1>*, .markdown-source-view.mod-cm6 .HyperMD-header-2>*, .markdown-source-view.mod-cm6 .HyperMD-header-3>*, .markdown-source-view.mod-cm6 .HyperMD-header-4>*, .markdown-source-view.mod-cm6 .HyperMD-header-5>*, .markdown-source-view.mod-cm6 .HyperMD-header-6>* { display: inline !important; vertical-align: middle !important; } /* Specifically target widget buffers in headers */ .markdown-source-view.mod-cm6 .HyperMD-header img.cm-widgetBuffer, .markdown-source-view.mod-cm6 .HyperMD-header-1 img.cm-widgetBuffer, .markdown-source-view.mod-cm6 .HyperMD-header-2 img.cm-widgetBuffer, .markdown-source-view.mod-cm6 .HyperMD-header-3 img.cm-widgetBuffer, .markdown-source-view.mod-cm6 .HyperMD-header-4 img.cm-widgetBuffer, .markdown-source-view.mod-cm6 .HyperMD-header-5 img.cm-widgetBuffer, .markdown-source-view.mod-cm6 .HyperMD-header-6 img.cm-widgetBuffer { display: inline !important; width: 0 !important; height: 0 !important; margin: 0 !important; padding: 0 !important; } /* Target the actual images within headers */ .markdown-source-view.mod-cm6 .HyperMD-header img:not(.cm-widgetBuffer), .markdown-source-view.mod-cm6 .HyperMD-header-1 img:not(.cm-widgetBuffer), .markdown-source-view.mod-cm6 .HyperMD-header-2 img:not(.cm-widgetBuffer), .markdown-source-view.mod-cm6 .HyperMD-header-3 img:not(.cm-widgetBuffer), .markdown-source-view.mod-cm6 .HyperMD-header-4 img:not(.cm-widgetBuffer), .markdown-source-view.mod-cm6 .HyperMD-header-5 img:not(.cm-widgetBuffer), .markdown-source-view.mod-cm6 .HyperMD-header-6 img:not(.cm-widgetBuffer) { display: inline !important; vertical-align: middle !important; max-height: 1.2em !important; margin: 4px 2px 4px 8px !important; } .inline-title { display: block; padding-bottom: .3em; border-bottom: 1px solid var(--color-base-50); margin-top: 0; margin-bottom: 16px !important; margin-right: 0 !important; min-width: 0 !important; color: var(--text-normal); font-weight: 600; line-height: 1.125; } /* ───────────────────────────────────────────────────────────────────────── LIST SPACING - Ensure proper spacing in both reading and editing modes ───────────────────────────────────────────────────────────────────────── */ .markdown-preview-view li { margin-top: 0.25em; margin-bottom: 0.25em; line-height: var(--line-height-normal); } /* ───────────────────────────────────────────────────────────────────────── TABLES - GitHub-style alternating row colors ───────────────────────────────────────────────────────────────────────── */ table tbody tr { background-color: var(--background-primary); background-color: var(--color-orange); } /* table tbody tr:nth-child(2n) { background-color: var(--table-row-alt-background); background-color: var(--color-orange); } */ /* Details/Summary elements */ .markdown-preview-view details { margin-top: 16px; margin-bottom: 16px; } .markdown-preview-view summary { cursor: pointer; margin-bottom: 8px; font-weight: var(--font-semibold); } /* ───────────────────────────────────────────────────────────────────────── LINKS - All links underlined except in headers ───────────────────────────────────────────────────────────────────────── */ /* All links underlined in reading mode */ .markdown-rendered a, .markdown-preview-view a { text-decoration: underline !important; } /* All links underlined in editing mode */ .markdown-source-view.mod-cm6 .cm-link, .markdown-source-view.mod-cm6 .cm-underline, .markdown-source-view.mod-cm6 .cm-url, .markdown-source-view.mod-cm6 .cm-hmd-internal-link, .markdown-source-view.mod-cm6 a { text-decoration: underline !important; } /* Remove underline from links in headers (reading mode) */ .markdown-rendered h1 a, .markdown-rendered h2 a, .markdown-rendered h3 a, .markdown-rendered h4 a, .markdown-rendered h5 a, .markdown-rendered h6 a, .markdown-preview-view h1 a, .markdown-preview-view h2 a, .markdown-preview-view h3 a, .markdown-preview-view h4 a, .markdown-preview-view h5 a, .markdown-preview-view h6 a { text-decoration: none !important; } /* Remove underline from links in headers (editing mode) */ .markdown-source-view.mod-cm6 .HyperMD-header .cm-link, .markdown-source-view.mod-cm6 .HyperMD-header .cm-underline, .markdown-source-view.mod-cm6 .HyperMD-header .cm-url, .markdown-source-view.mod-cm6 .HyperMD-header .cm-hmd-internal-link, .markdown-source-view.mod-cm6 .HyperMD-header a { text-decoration: none !important; } /* Images - ensure proper spacing and display */ .markdown-preview-view img { display: block; margin-top: 8px; margin-bottom: 8px; max-width: 100%; height: auto; } /* Inline images in paragraphs/links - keep inline for badges, etc. */ .markdown-preview-view p img, .markdown-preview-view a img { display: inline-block; margin: 0 2px; vertical-align: middle; } /* List items containing images - fix layout */ .markdown-preview-view li>img { display: block; margin: 8px 0; } /* ───────────────────────────────────────────────────────────────────────── DOCUMENT CONTAINER - Full-width with side margins and border ───────────────────────────────────────────────────────────────────────── */ .markdown-preview-view, .markdown-source-view.mod-cm6 { --file-line-width: 85%; } /* Always apply — GitHub-style bordered document container */ .workspace-leaf-content[data-type="markdown"] .markdown-preview-sizer, .workspace-leaf-content[data-type="markdown"] .cm-sizer { padding: 32px; margin-left: 14px; margin-right: 14px; border: 1px solid var(--color-base-50); border-radius: 6px; } /* Scoped to markdown note views — canvas nodes manage their own width */ .workspace-leaf-content[data-type="markdown"] .cm-content, .workspace-leaf-content[data-type="markdown"] .cm-line { max-width: 100% !important; width: 100%; } /* ───────────────────────────────────────────────────────────────────────── CANVAS ───────────────────────────────────────────────────────────────────────── */ /* Background dot grid */ svg.canvas-background circle { fill: var(--canvas-dot-pattern); } /* Default card (node) container */ .canvas-node-container { background-color: var(--color-base-10); border-color: var(--color-base-30); border-radius: 6px; } /* Focused/selected card */ .canvas-node.is-focused > .canvas-node-container, .canvas-node.is-selected > .canvas-node-container { border-color: var(--color-accent); box-shadow: 0 0 0 2px var(--color-accent); } /* Colored card variants — border uses full color, background uses 10% alpha tint */ .canvas-node[data-color="1"] .canvas-node-container { border-color: rgb(var(--canvas-color-1)); background-color: rgba(var(--canvas-color-1), 0.1); } .canvas-node[data-color="2"] .canvas-node-container { border-color: rgb(var(--canvas-color-2)); background-color: rgba(var(--canvas-color-2), 0.1); } .canvas-node[data-color="3"] .canvas-node-container { border-color: rgb(var(--canvas-color-3)); background-color: rgba(var(--canvas-color-3), 0.1); } .canvas-node[data-color="4"] .canvas-node-container { border-color: rgb(var(--canvas-color-4)); background-color: rgba(var(--canvas-color-4), 0.1); } .canvas-node[data-color="5"] .canvas-node-container { border-color: rgb(var(--canvas-color-5)); background-color: rgba(var(--canvas-color-5), 0.1); } .canvas-node[data-color="6"] .canvas-node-container { border-color: rgb(var(--canvas-color-6)); background-color: rgba(var(--canvas-color-6), 0.1); } /* Group containers */ .canvas-node[data-type="group"] > .canvas-node-container { background-color: rgba(var(--mono-rgb-100), 0.03); border-color: var(--color-base-35); border-style: dashed; } /* Group label */ .canvas-group-label { color: var(--canvas-card-label-color); font-size: var(--font-small); font-weight: var(--font-semibold); } /* Edge / connection lines */ .canvas-edges path.canvas-display-path { stroke: var(--color-base-50); } /* Colored edges — parent gets mod-canvas-color-N, child path is canvas-display-path */ .mod-canvas-color-1 path.canvas-display-path { stroke: rgb(var(--canvas-color-1)); } .mod-canvas-color-2 path.canvas-display-path { stroke: rgb(var(--canvas-color-2)); } .mod-canvas-color-3 path.canvas-display-path { stroke: rgb(var(--canvas-color-3)); } .mod-canvas-color-4 path.canvas-display-path { stroke: rgb(var(--canvas-color-4)); } .mod-canvas-color-5 path.canvas-display-path { stroke: rgb(var(--canvas-color-5)); } .mod-canvas-color-6 path.canvas-display-path { stroke: rgb(var(--canvas-color-6)); }