mirror of
https://github.com/andy-stack/vaultkeeper-ai.git
synced 2026-07-22 06:42:03 +00:00
Implement clickable wiki-links in assistant responses with WorkSpaceService for note navigation. Add API key validation with visual feedback in ChatWindow, automatically opening settings when empty. Extract settings helper to reduce code duplication. Refactor Gemini class to resolve API key from plugin settings rather than constructor parameter. Update system prompt with wiki-link usage guidelines. Remove unused ODB cache implementation and loadExternalCSS helper. Improve UI with enhanced empty state styling and input textarea scrolling behavior. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1395 lines
No EOL
24 KiB
CSS
1395 lines
No EOL
24 KiB
CSS
/* ============================== */
|
|
/* Main View Customization */
|
|
/* ============================== */
|
|
|
|
.workspace-leaf-content[data-type="main-view"] .view-content {
|
|
background: linear-gradient(
|
|
to bottom,
|
|
var(--color-base-25),
|
|
var(--color-base-20),
|
|
var(--color-base-20),
|
|
var(--color-base-20),
|
|
var(--color-base-20),
|
|
var(--color-base-20),
|
|
var(--color-base-20),
|
|
var(--color-base-20),
|
|
var(--color-base-20),
|
|
var(--color-base-20),
|
|
var(--color-base-20),
|
|
var(--color-base-20),
|
|
var(--color-base-20),
|
|
var(--color-base-20),
|
|
var(--color-base-20),
|
|
var(--color-base-20),
|
|
var(--color-base-20),
|
|
var(--color-base-20),
|
|
var(--color-base-20),
|
|
var(--color-base-20)
|
|
);
|
|
padding-top: 0;
|
|
}
|
|
|
|
/* ============================== */
|
|
/* Settings API Key Highlighting */
|
|
/* ============================== */
|
|
|
|
.api-key-setting-ok input[type="text"],
|
|
.api-key-setting-ok input[type="password"],
|
|
.api-key-setting-ok textarea {
|
|
border-color: var(--color-green) !important;
|
|
}
|
|
|
|
.api-key-setting-error input[type="text"],
|
|
.api-key-setting-error input[type="password"],
|
|
.api-key-setting-error textarea {
|
|
border-color: var(--color-red) !important;
|
|
}
|
|
|
|
.api-key-setting-error .setting-item-control {
|
|
animation: shake 0.5s ease-in-out;
|
|
}
|
|
|
|
@keyframes shake {
|
|
0%, 100% { transform: translateX(0); }
|
|
25% { transform: translateX(-5px); }
|
|
75% { transform: translateX(5px); }
|
|
}
|
|
|
|
/* ============================== */
|
|
/* CSS Variables for Common Components */
|
|
/* ============================== */
|
|
|
|
/* does this affect all modals? */
|
|
.conversation-history-modal {
|
|
padding: 0px;
|
|
overflow: hidden;
|
|
}
|
|
.conversation-history-modal .modal-header {
|
|
display: none;
|
|
}
|
|
.conversation-history-modal .modal-close-button {
|
|
display: none;
|
|
}
|
|
|
|
.top-bar-button {
|
|
margin: var(--size-4-2) 0px var(--size-4-2) 0px;
|
|
padding: var(--size-4-1) var(--size-4-2) var(--size-4-1) var(--size-4-2);
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.top-bar-button:hover {
|
|
background-color: var(--color-base-35);
|
|
}
|
|
|
|
/* ============================== */
|
|
/* CSS Variables for Theming */
|
|
/* ============================== */
|
|
|
|
:root {
|
|
--code-background: #24292e;
|
|
--code-background-inline: rgba(27, 31, 35, 0.05);
|
|
--text-color: #24292e;
|
|
--text-muted: #586069;
|
|
--link-color: #0969da;
|
|
--blockquote-border: #d0d7de;
|
|
--table-border: #d0d7de;
|
|
--table-header-background: #f6f8fa;
|
|
--hr-color: #d0d7de;
|
|
--checkbox-bg: #fff;
|
|
--checkbox-border: #d1d5da;
|
|
--checkbox-checked-bg: #0969da;
|
|
--footnote-border: #d0d7de;
|
|
}
|
|
|
|
/* Dark mode variables */
|
|
@media (prefers-color-scheme: dark) {
|
|
:root {
|
|
--code-background: #161b22;
|
|
--code-background-inline: rgba(240, 246, 252, 0.15);
|
|
--text-color: #c9d1d9;
|
|
--text-muted: #8b949e;
|
|
--link-color: #58a6ff;
|
|
--blockquote-border: #3b434b;
|
|
--table-border: #3b434b;
|
|
--table-header-background: #161b22;
|
|
--hr-color: #3b434b;
|
|
--checkbox-bg: #161b22;
|
|
--checkbox-border: #3b434b;
|
|
--checkbox-checked-bg: #58a6ff;
|
|
--footnote-border: #3b434b;
|
|
}
|
|
}
|
|
|
|
/* ============================== */
|
|
/* Syntax Highlighting Styles */
|
|
/* GitHub Dark Theme for highlight.js */
|
|
/* ============================== */
|
|
|
|
.hljs {
|
|
display: block;
|
|
overflow-x: auto;
|
|
padding: 0.5em;
|
|
color: #e1e4e8;
|
|
background: #24292e;
|
|
}
|
|
|
|
/* Language indicator */
|
|
.hljs.language-js::before,
|
|
.hljs.language-javascript::before,
|
|
.hljs.language-python::before,
|
|
.hljs.language-css::before,
|
|
.hljs.language-html::before,
|
|
.hljs.language-typescript::before,
|
|
.hljs.language-jsx::before,
|
|
.hljs.language-tsx::before {
|
|
content: attr(class);
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
padding: 0.25em 0.5em;
|
|
font-size: 0.75em;
|
|
color: #8b949e;
|
|
background: rgba(0, 0, 0, 0.3);
|
|
border-radius: 0 0 0 0.25em;
|
|
}
|
|
|
|
.hljs-doctag,
|
|
.hljs-keyword,
|
|
.hljs-meta .hljs-keyword,
|
|
.hljs-template-tag,
|
|
.hljs-template-variable,
|
|
.hljs-type,
|
|
.hljs-variable.language_ {
|
|
color: #f97583;
|
|
}
|
|
|
|
.hljs-title,
|
|
.hljs-title.class_,
|
|
.hljs-title.class_.inherited__,
|
|
.hljs-title.function_ {
|
|
color: #b392f0;
|
|
}
|
|
|
|
.hljs-attr,
|
|
.hljs-attribute,
|
|
.hljs-literal,
|
|
.hljs-meta,
|
|
.hljs-number,
|
|
.hljs-operator,
|
|
.hljs-selector-attr,
|
|
.hljs-selector-class,
|
|
.hljs-selector-id,
|
|
.hljs-variable {
|
|
color: #79b8ff;
|
|
}
|
|
|
|
.hljs-meta .hljs-string,
|
|
.hljs-regexp,
|
|
.hljs-string {
|
|
color: #9ecbff;
|
|
}
|
|
|
|
.hljs-built_in,
|
|
.hljs-symbol {
|
|
color: #ffab70;
|
|
}
|
|
|
|
.hljs-code,
|
|
.hljs-comment,
|
|
.hljs-formula {
|
|
color: #6a737d;
|
|
}
|
|
|
|
.hljs-name,
|
|
.hljs-quote,
|
|
.hljs-selector-pseudo,
|
|
.hljs-selector-tag {
|
|
color: #85e89d;
|
|
}
|
|
|
|
.hljs-subst {
|
|
color: #e1e4e8;
|
|
}
|
|
|
|
.hljs-section {
|
|
color: #79b8ff;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.hljs-bullet {
|
|
color: #ffab70;
|
|
}
|
|
|
|
.hljs-emphasis {
|
|
color: #e1e4e8;
|
|
font-style: italic;
|
|
}
|
|
|
|
.hljs-strong {
|
|
color: #e1e4e8;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.hljs-addition {
|
|
color: #85e89d;
|
|
background-color: #144620;
|
|
}
|
|
|
|
.hljs-deletion {
|
|
color: #ffdcd7;
|
|
background-color: #86181d;
|
|
}
|
|
|
|
.hljs-char.escape_,
|
|
.hljs-link,
|
|
.hljs-params,
|
|
.hljs-property,
|
|
.hljs-punctuation,
|
|
.hljs-tag {
|
|
color: #e1e4e8;
|
|
}
|
|
|
|
/* Additional highlight.js classes for better coverage */
|
|
.hljs-selector-pseudo {
|
|
color: #79b8ff;
|
|
}
|
|
|
|
.hljs-selector-tag {
|
|
color: #85e89d;
|
|
}
|
|
|
|
.hljs-template-comment {
|
|
color: #6a737d;
|
|
}
|
|
|
|
.hljs-meta-keyword {
|
|
color: #f97583;
|
|
}
|
|
|
|
.hljs-meta-string {
|
|
color: #9ecbff;
|
|
}
|
|
|
|
/* Alternative dark theme colors if preferred */
|
|
.hljs.github-dark-dimmed {
|
|
color: #adbac7;
|
|
background: #22272e;
|
|
}
|
|
|
|
/* ============================== */
|
|
/* GFM Task Lists */
|
|
/* ============================== */
|
|
|
|
/* Task list container */
|
|
.contains-task-list,
|
|
ul.contains-task-list {
|
|
list-style: none;
|
|
padding-left: 0;
|
|
}
|
|
|
|
/* Task list items */
|
|
.task-list-item,
|
|
li.task-list-item {
|
|
position: relative;
|
|
list-style: none;
|
|
padding-left: 1.75em;
|
|
margin-left: 0;
|
|
}
|
|
|
|
/* Task list checkboxes */
|
|
.task-list-item > input[type="checkbox"],
|
|
.task-list-item input[type="checkbox"] {
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0.25em;
|
|
margin: 0;
|
|
width: 1em;
|
|
height: 1em;
|
|
cursor: pointer;
|
|
background-color: var(--checkbox-bg);
|
|
border: 1px solid var(--checkbox-border);
|
|
border-radius: 3px;
|
|
appearance: none;
|
|
-webkit-appearance: none;
|
|
-moz-appearance: none;
|
|
}
|
|
|
|
/* Checked state */
|
|
.task-list-item > input[type="checkbox"]:checked,
|
|
.task-list-item input[type="checkbox"]:checked {
|
|
background-color: var(--checkbox-checked-bg);
|
|
border-color: var(--checkbox-checked-bg);
|
|
}
|
|
|
|
/* Checkmark for checked boxes */
|
|
.task-list-item > input[type="checkbox"]:checked::after,
|
|
.task-list-item input[type="checkbox"]:checked::after {
|
|
content: "✓";
|
|
display: block;
|
|
text-align: center;
|
|
color: white;
|
|
font-size: 0.75em;
|
|
line-height: 1em;
|
|
font-weight: bold;
|
|
}
|
|
|
|
/* Disabled state */
|
|
.task-list-item > input[type="checkbox"]:disabled,
|
|
.task-list-item input[type="checkbox"]:disabled {
|
|
cursor: not-allowed;
|
|
opacity: 0.6;
|
|
}
|
|
|
|
/* Nested task lists */
|
|
.task-list-item .contains-task-list {
|
|
margin-top: 0.25em;
|
|
margin-bottom: 0.25em;
|
|
}
|
|
|
|
/* ============================== */
|
|
/* GFM Footnotes */
|
|
/* ============================== */
|
|
|
|
/* Footnote references */
|
|
sup[data-footnote-ref],
|
|
a[data-footnote-ref] {
|
|
font-weight: bold;
|
|
text-decoration: none;
|
|
color: var(--link-color);
|
|
}
|
|
|
|
sup[data-footnote-ref]::before {
|
|
content: "[";
|
|
}
|
|
|
|
sup[data-footnote-ref]::after {
|
|
content: "]";
|
|
}
|
|
|
|
/* Footnote section */
|
|
section[data-footnotes],
|
|
.footnotes {
|
|
margin-top: 2em;
|
|
padding-top: 1em;
|
|
border-top: 1px solid var(--footnote-border);
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
/* Footnote list */
|
|
section[data-footnotes] ol,
|
|
.footnotes ol {
|
|
padding-left: 1.5em;
|
|
}
|
|
|
|
/* Footnote back references */
|
|
a[data-footnote-backref] {
|
|
text-decoration: none;
|
|
margin-left: 0.25em;
|
|
}
|
|
|
|
/* ============================== */
|
|
/* KaTeX Math Rendering Styles */
|
|
/* ============================== */
|
|
|
|
.katex {
|
|
font: normal 1.21em KaTeX_Main, "Times New Roman", serif;
|
|
line-height: 1.2;
|
|
text-indent: 0;
|
|
text-rendering: auto;
|
|
}
|
|
|
|
.katex * {
|
|
-ms-high-contrast-adjust: none !important;
|
|
border-color: currentColor;
|
|
}
|
|
|
|
.katex .katex-mathml {
|
|
clip: rect(1px, 1px, 1px, 1px);
|
|
border: 0;
|
|
height: 1px;
|
|
overflow: hidden;
|
|
padding: 0;
|
|
position: absolute;
|
|
width: 1px;
|
|
}
|
|
|
|
.katex .katex-html > .newline {
|
|
display: block;
|
|
}
|
|
|
|
.katex .base {
|
|
position: relative;
|
|
white-space: nowrap;
|
|
width: -webkit-min-content;
|
|
width: -moz-min-content;
|
|
width: min-content;
|
|
}
|
|
|
|
.katex .base,
|
|
.katex .strut {
|
|
display: inline-block;
|
|
}
|
|
|
|
.katex .textbf {
|
|
font-weight: 700;
|
|
}
|
|
|
|
.katex .textit {
|
|
font-style: italic;
|
|
}
|
|
|
|
.katex .textrm {
|
|
font-family: KaTeX_Main;
|
|
}
|
|
|
|
.katex .textsf {
|
|
font-family: KaTeX_SansSerif;
|
|
}
|
|
|
|
.katex .texttt {
|
|
font-family: KaTeX_Typewriter;
|
|
}
|
|
|
|
.katex .mathnormal {
|
|
font-family: KaTeX_Math;
|
|
font-style: italic;
|
|
}
|
|
|
|
.katex .mathit {
|
|
font-family: KaTeX_Main;
|
|
font-style: italic;
|
|
}
|
|
|
|
.katex .mathrm {
|
|
font-style: normal;
|
|
}
|
|
|
|
.katex .mathbf {
|
|
font-family: KaTeX_Main;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.katex .boldsymbol {
|
|
font-family: KaTeX_Math;
|
|
font-style: italic;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.katex .amsrm,
|
|
.katex .mathbb,
|
|
.katex .textbb {
|
|
font-family: KaTeX_AMS;
|
|
}
|
|
|
|
.katex .mathcal {
|
|
font-family: KaTeX_Caligraphic;
|
|
}
|
|
|
|
.katex .mathfrak,
|
|
.katex .textfrak {
|
|
font-family: KaTeX_Fraktur;
|
|
}
|
|
|
|
.katex .mathboldfrak,
|
|
.katex .textboldfrak {
|
|
font-family: KaTeX_Fraktur;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.katex .mathtt {
|
|
font-family: KaTeX_Typewriter;
|
|
}
|
|
|
|
.katex .mathscr,
|
|
.katex .textscr {
|
|
font-family: KaTeX_Script;
|
|
}
|
|
|
|
.katex .mathsf {
|
|
font-family: KaTeX_SansSerif;
|
|
}
|
|
|
|
.katex .mathboldsf,
|
|
.katex .textboldsf {
|
|
font-family: KaTeX_SansSerif;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.katex .mathitsf,
|
|
.katex .mathsfit,
|
|
.katex .textitsf {
|
|
font-family: KaTeX_SansSerif;
|
|
font-style: italic;
|
|
}
|
|
|
|
.katex .mainrm {
|
|
font-family: KaTeX_Main;
|
|
font-style: normal;
|
|
}
|
|
|
|
/* KaTeX Layout */
|
|
.katex .vlist-t {
|
|
border-collapse: collapse;
|
|
display: inline-table;
|
|
table-layout: fixed;
|
|
}
|
|
|
|
.katex .vlist-r {
|
|
display: table-row;
|
|
}
|
|
|
|
.katex .vlist {
|
|
display: table-cell;
|
|
position: relative;
|
|
vertical-align: bottom;
|
|
}
|
|
|
|
.katex .vlist > span {
|
|
display: block;
|
|
height: 0;
|
|
position: relative;
|
|
}
|
|
|
|
.katex .vlist > span > span {
|
|
display: inline-block;
|
|
}
|
|
|
|
.katex .vlist > span > .pstrut {
|
|
overflow: hidden;
|
|
width: 0;
|
|
}
|
|
|
|
.katex .vlist-t2 {
|
|
margin-right: -2px;
|
|
}
|
|
|
|
.katex .vlist-s {
|
|
display: table-cell;
|
|
font-size: 1px;
|
|
min-width: 2px;
|
|
vertical-align: bottom;
|
|
width: 2px;
|
|
}
|
|
|
|
.katex .vbox {
|
|
align-items: baseline;
|
|
display: inline-flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.katex .hbox {
|
|
width: 100%;
|
|
display: inline-flex;
|
|
flex-direction: row;
|
|
}
|
|
|
|
.katex .thinbox {
|
|
display: inline-flex;
|
|
flex-direction: row;
|
|
max-width: 0;
|
|
width: 0;
|
|
}
|
|
|
|
/* KaTeX Fractions and Lines */
|
|
.katex .msupsub {
|
|
text-align: left;
|
|
}
|
|
|
|
.katex .mfrac > span > span {
|
|
text-align: center;
|
|
}
|
|
|
|
.katex .mfrac .frac-line {
|
|
border-bottom-style: solid;
|
|
display: inline-block;
|
|
width: 100%;
|
|
}
|
|
|
|
.katex .hdashline,
|
|
.katex .hline,
|
|
.katex .mfrac .frac-line,
|
|
.katex .overline .overline-line,
|
|
.katex .rule,
|
|
.katex .underline .underline-line {
|
|
min-height: 1px;
|
|
}
|
|
|
|
.katex .mspace {
|
|
display: inline-block;
|
|
}
|
|
|
|
/* KaTeX Positioning */
|
|
.katex .clap,
|
|
.katex .llap,
|
|
.katex .rlap {
|
|
position: relative;
|
|
width: 0;
|
|
}
|
|
|
|
.katex .clap > .inner,
|
|
.katex .llap > .inner,
|
|
.katex .rlap > .inner {
|
|
position: absolute;
|
|
}
|
|
|
|
.katex .clap > .fix,
|
|
.katex .llap > .fix,
|
|
.katex .rlap > .fix {
|
|
display: inline-block;
|
|
}
|
|
|
|
.katex .llap > .inner {
|
|
right: 0;
|
|
}
|
|
|
|
.katex .clap > .inner,
|
|
.katex .rlap > .inner {
|
|
left: 0;
|
|
}
|
|
|
|
.katex .clap > .inner > span {
|
|
margin-left: -50%;
|
|
margin-right: 50%;
|
|
}
|
|
|
|
/* KaTeX Rules and Lines */
|
|
.katex .rule {
|
|
border: 0 solid;
|
|
display: inline-block;
|
|
position: relative;
|
|
}
|
|
|
|
.katex .hline,
|
|
.katex .overline .overline-line,
|
|
.katex .underline .underline-line {
|
|
border-bottom-style: solid;
|
|
display: inline-block;
|
|
width: 100%;
|
|
}
|
|
|
|
.katex .hdashline {
|
|
border-bottom-style: dashed;
|
|
display: inline-block;
|
|
width: 100%;
|
|
}
|
|
|
|
/* KaTeX Square Root */
|
|
.katex .sqrt > .root {
|
|
margin-left: 0.27777778em;
|
|
margin-right: -0.55555556em;
|
|
}
|
|
|
|
/* KaTeX Sizing - Essential subset */
|
|
.katex .fontsize-ensurer.reset-size1.size1,
|
|
.katex .sizing.reset-size1.size1 {
|
|
font-size: 1em;
|
|
}
|
|
|
|
.katex .fontsize-ensurer.reset-size1.size2,
|
|
.katex .sizing.reset-size1.size2 {
|
|
font-size: 1.2em;
|
|
}
|
|
|
|
.katex .fontsize-ensurer.reset-size1.size3,
|
|
.katex .sizing.reset-size1.size3 {
|
|
font-size: 1.4em;
|
|
}
|
|
|
|
.katex .fontsize-ensurer.reset-size1.size4,
|
|
.katex .sizing.reset-size1.size4 {
|
|
font-size: 1.6em;
|
|
}
|
|
|
|
.katex .fontsize-ensurer.reset-size1.size5,
|
|
.katex .sizing.reset-size1.size5 {
|
|
font-size: 1.8em;
|
|
}
|
|
|
|
.katex .fontsize-ensurer.reset-size1.size6,
|
|
.katex .sizing.reset-size1.size6 {
|
|
font-size: 2em;
|
|
}
|
|
|
|
.katex .fontsize-ensurer.reset-size1.size7,
|
|
.katex .sizing.reset-size1.size7 {
|
|
font-size: 2.4em;
|
|
}
|
|
|
|
/* KaTeX Delimiters */
|
|
.katex .delimsizing.size1 {
|
|
font-family: KaTeX_Size1;
|
|
}
|
|
|
|
.katex .delimsizing.size2 {
|
|
font-family: KaTeX_Size2;
|
|
}
|
|
|
|
.katex .delimsizing.size3 {
|
|
font-family: KaTeX_Size3;
|
|
}
|
|
|
|
.katex .delimsizing.size4 {
|
|
font-family: KaTeX_Size4;
|
|
}
|
|
|
|
.katex .nulldelimiter {
|
|
display: inline-block;
|
|
width: 0.12em;
|
|
}
|
|
|
|
.katex .delimcenter,
|
|
.katex .op-symbol {
|
|
position: relative;
|
|
}
|
|
|
|
.katex .op-symbol.small-op {
|
|
font-family: KaTeX_Size1;
|
|
}
|
|
|
|
.katex .op-symbol.large-op {
|
|
font-family: KaTeX_Size2;
|
|
}
|
|
|
|
/* KaTeX Accents and Symbols */
|
|
.katex .accent > .vlist-t,
|
|
.katex .op-limits > .vlist-t {
|
|
text-align: center;
|
|
}
|
|
|
|
.katex .accent .accent-body {
|
|
position: relative;
|
|
}
|
|
|
|
.katex .accent .accent-body:not(.accent-full) {
|
|
width: 0;
|
|
}
|
|
|
|
.katex .overlay {
|
|
display: block;
|
|
}
|
|
|
|
/* KaTeX Tables */
|
|
.katex .mtable .vertical-separator {
|
|
display: inline-block;
|
|
min-width: 1px;
|
|
}
|
|
|
|
.katex .mtable .arraycolsep {
|
|
display: inline-block;
|
|
}
|
|
|
|
.katex .mtable .col-align-c > .vlist-t {
|
|
text-align: center;
|
|
}
|
|
|
|
.katex .mtable .col-align-l > .vlist-t {
|
|
text-align: left;
|
|
}
|
|
|
|
.katex .mtable .col-align-r > .vlist-t {
|
|
text-align: right;
|
|
}
|
|
|
|
/* KaTeX SVG Support */
|
|
.katex .svg-align {
|
|
text-align: left;
|
|
}
|
|
|
|
.katex svg {
|
|
fill: currentColor;
|
|
stroke: currentColor;
|
|
fill-rule: nonzero;
|
|
fill-opacity: 1;
|
|
stroke-width: 1;
|
|
stroke-linecap: butt;
|
|
stroke-linejoin: miter;
|
|
stroke-miterlimit: 4;
|
|
stroke-dasharray: none;
|
|
stroke-dashoffset: 0;
|
|
stroke-opacity: 1;
|
|
display: block;
|
|
height: inherit;
|
|
position: absolute;
|
|
width: 100%;
|
|
}
|
|
|
|
.katex svg path {
|
|
stroke: none;
|
|
}
|
|
|
|
.katex img {
|
|
border-style: none;
|
|
max-height: none;
|
|
max-width: none;
|
|
min-height: 0;
|
|
min-width: 0;
|
|
}
|
|
|
|
/* KaTeX Stretchy Elements */
|
|
.katex .stretchy {
|
|
display: block;
|
|
overflow: hidden;
|
|
position: relative;
|
|
width: 100%;
|
|
}
|
|
|
|
.katex .stretchy::after,
|
|
.katex .stretchy::before {
|
|
content: "";
|
|
}
|
|
|
|
.katex .hide-tail {
|
|
overflow: hidden;
|
|
position: relative;
|
|
width: 100%;
|
|
}
|
|
|
|
/* KaTeX Arrows and Braces */
|
|
.katex .halfarrow-left {
|
|
left: 0;
|
|
overflow: hidden;
|
|
position: absolute;
|
|
width: 50.2%;
|
|
}
|
|
|
|
.katex .halfarrow-right {
|
|
overflow: hidden;
|
|
position: absolute;
|
|
right: 0;
|
|
width: 50.2%;
|
|
}
|
|
|
|
.katex .brace-left {
|
|
left: 0;
|
|
overflow: hidden;
|
|
position: absolute;
|
|
width: 25.1%;
|
|
}
|
|
|
|
.katex .brace-center {
|
|
left: 25%;
|
|
overflow: hidden;
|
|
position: absolute;
|
|
width: 50%;
|
|
}
|
|
|
|
.katex .brace-right {
|
|
overflow: hidden;
|
|
position: absolute;
|
|
right: 0;
|
|
width: 25.1%;
|
|
}
|
|
|
|
/* KaTeX Padding and Boxes */
|
|
.katex .x-arrow-pad {
|
|
padding: 0 0.5em;
|
|
}
|
|
|
|
.katex .cd-arrow-pad {
|
|
padding: 0 0.55556em 0 0.27778em;
|
|
}
|
|
|
|
.katex .mover,
|
|
.katex .munder,
|
|
.katex .x-arrow {
|
|
text-align: center;
|
|
}
|
|
|
|
.katex .boxpad {
|
|
padding: 0 0.3em;
|
|
}
|
|
|
|
.katex .fbox,
|
|
.katex .fcolorbox {
|
|
border: 0.04em solid;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* KaTeX Cancel */
|
|
.katex .cancel-pad {
|
|
padding: 0 0.2em;
|
|
}
|
|
|
|
.katex .cancel-lap {
|
|
margin-left: -0.2em;
|
|
margin-right: -0.2em;
|
|
}
|
|
|
|
.katex .sout {
|
|
border-bottom-style: solid;
|
|
border-bottom-width: 0.08em;
|
|
}
|
|
|
|
/* KaTeX Angles */
|
|
.katex .angl {
|
|
border-right: 0.049em solid;
|
|
border-top: 0.049em solid;
|
|
box-sizing: border-box;
|
|
margin-right: 0.03889em;
|
|
}
|
|
|
|
.katex .anglpad {
|
|
padding: 0 0.03889em;
|
|
}
|
|
|
|
/* KaTeX Equation Numbers */
|
|
.katex .eqn-num::before {
|
|
content: "(" counter(katexEqnNo) ")";
|
|
counter-increment: katexEqnNo;
|
|
}
|
|
|
|
.katex .mml-eqn-num::before {
|
|
content: "(" counter(mmlEqnNo) ")";
|
|
counter-increment: mmlEqnNo;
|
|
}
|
|
|
|
/* KaTeX Display Mode */
|
|
.katex-display {
|
|
display: block;
|
|
margin: 1em 0;
|
|
text-align: center;
|
|
}
|
|
|
|
.katex-display > .katex {
|
|
display: block;
|
|
text-align: center;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.katex-display > .katex > .katex-html {
|
|
display: block;
|
|
position: relative;
|
|
}
|
|
|
|
.katex-display > .katex > .katex-html > .tag {
|
|
position: absolute;
|
|
right: 0;
|
|
}
|
|
|
|
.katex-display.leqno > .katex > .katex-html > .tag {
|
|
left: 0;
|
|
right: auto;
|
|
}
|
|
|
|
.katex-display.fleqn > .katex {
|
|
padding-left: 2em;
|
|
text-align: left;
|
|
}
|
|
|
|
body {
|
|
counter-reset: katexEqnNo mmlEqnNo;
|
|
}
|
|
|
|
/* ============================== */
|
|
/* KaTeX Font Fallbacks */
|
|
/* For Obsidian, we'll use system fonts as fallbacks */
|
|
/* ============================== */
|
|
|
|
.katex {
|
|
font-family: "KaTeX_Main", "Times New Roman", Times, serif;
|
|
}
|
|
|
|
.katex .mathit,
|
|
.katex .mathnormal {
|
|
font-family: "KaTeX_Math", "Times New Roman", Times, serif;
|
|
font-style: italic;
|
|
}
|
|
|
|
.katex .mathbf {
|
|
font-family: "KaTeX_Main", "Times New Roman", Times, serif;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.katex .amsrm,
|
|
.katex .mathbb,
|
|
.katex .textbb {
|
|
font-family: "KaTeX_AMS", "Times New Roman", Times, serif;
|
|
}
|
|
|
|
.katex .mathcal {
|
|
font-family: "KaTeX_Caligraphic", "Lucida Calligraphy", "Brush Script MT", cursive;
|
|
}
|
|
|
|
.katex .mathfrak,
|
|
.katex .textfrak {
|
|
font-family: "KaTeX_Fraktur", "Lucida Blackletter", fantasy;
|
|
}
|
|
|
|
.katex .mathtt {
|
|
font-family: "KaTeX_Typewriter", "Courier New", Courier, monospace;
|
|
}
|
|
|
|
.katex .mathscr,
|
|
.katex .textscr {
|
|
font-family: "KaTeX_Script", "Lucida Handwriting", "Segoe Script", cursive;
|
|
}
|
|
|
|
.katex .mathsf,
|
|
.katex .textsf {
|
|
font-family: "KaTeX_SansSerif", Arial, Helvetica, sans-serif;
|
|
}
|
|
|
|
/* ============================== */
|
|
/* Additional Markdown Styles */
|
|
/* ============================== */
|
|
|
|
/* Headings in assistant messages */
|
|
.message-bubble.assistant h1 {
|
|
font-size: 1.5em;
|
|
font-weight: 600;
|
|
margin: 0.67em 0;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.message-bubble.assistant h2 {
|
|
font-size: 1.3em;
|
|
font-weight: 600;
|
|
margin: 0.75em 0;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.message-bubble.assistant h3 {
|
|
font-size: 1.1em;
|
|
font-weight: 600;
|
|
margin: 0.83em 0;
|
|
line-height: 1.3;
|
|
}
|
|
|
|
.message-bubble.assistant h4 {
|
|
font-size: 1em;
|
|
font-weight: 600;
|
|
margin: 1.12em 0;
|
|
line-height: 1.3;
|
|
}
|
|
|
|
.message-bubble.assistant h5 {
|
|
font-size: 0.9em;
|
|
font-weight: 600;
|
|
margin: 1.5em 0;
|
|
line-height: 1.3;
|
|
}
|
|
|
|
.message-bubble.assistant h6 {
|
|
font-size: 0.85em;
|
|
font-weight: 600;
|
|
margin: 1.67em 0;
|
|
line-height: 1.3;
|
|
}
|
|
|
|
/* Paragraphs */
|
|
.message-bubble.assistant p {
|
|
margin: 0.5em 0;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
/* Lists */
|
|
.message-bubble.assistant ul,
|
|
.message-bubble.assistant ol {
|
|
margin: 0.5em 0;
|
|
padding-left: 2em;
|
|
list-style-position: outside;
|
|
}
|
|
|
|
.message-bubble.assistant ol {
|
|
list-style-type: decimal;
|
|
}
|
|
|
|
.message-bubble.assistant ul {
|
|
list-style-type: disc;
|
|
}
|
|
|
|
.message-bubble.assistant li {
|
|
margin: 0.25em 0;
|
|
padding-left: 0.25em;
|
|
display: list-item;
|
|
}
|
|
|
|
/* Handle nested lists properly */
|
|
.message-bubble.assistant ol ol,
|
|
.message-bubble.assistant ul ul,
|
|
.message-bubble.assistant ol ul,
|
|
.message-bubble.assistant ul ol {
|
|
margin: 0.25em 0;
|
|
padding-left: 1.5em;
|
|
}
|
|
|
|
/* Ensure nested list numbering works correctly */
|
|
.message-bubble.assistant ol ol {
|
|
list-style-type: lower-alpha;
|
|
}
|
|
|
|
.message-bubble.assistant ol ol ol {
|
|
list-style-type: lower-roman;
|
|
}
|
|
|
|
/* Fix paragraph spacing inside list items */
|
|
.message-bubble.assistant li > p {
|
|
margin: 0;
|
|
}
|
|
|
|
.message-bubble.assistant li > p:first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.message-bubble.assistant li > p:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
/* Code blocks */
|
|
.message-bubble.assistant pre {
|
|
background-color: var(--code-background);
|
|
border-radius: 4px;
|
|
padding: 0.5em;
|
|
overflow-x: auto;
|
|
margin: 0.5em 0;
|
|
position: relative;
|
|
}
|
|
|
|
.message-bubble.assistant code {
|
|
background-color: var(--code-background-inline);
|
|
border-radius: 3px;
|
|
padding: 0.2em 0.4em;
|
|
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
.message-bubble.assistant pre code {
|
|
background-color: transparent;
|
|
padding: 0;
|
|
border-radius: 0;
|
|
}
|
|
|
|
/* Blockquotes */
|
|
.message-bubble.assistant blockquote {
|
|
border-left: 4px solid var(--blockquote-border);
|
|
padding-left: 1em;
|
|
margin: 0.5em 0;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
/* Tables */
|
|
.message-bubble.assistant table {
|
|
border-collapse: collapse;
|
|
margin: 0.5em 0;
|
|
width: 100%;
|
|
overflow-x: auto;
|
|
display: block;
|
|
}
|
|
|
|
.message-bubble.assistant th,
|
|
.message-bubble.assistant td {
|
|
border: 1px solid var(--table-border);
|
|
padding: 0.5em;
|
|
text-align: left;
|
|
min-width: 100px;
|
|
}
|
|
|
|
.message-bubble.assistant th {
|
|
background-color: var(--table-header-background);
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* Table alignment classes from GFM */
|
|
.message-bubble.assistant th[align="center"],
|
|
.message-bubble.assistant td[align="center"] {
|
|
text-align: center;
|
|
}
|
|
|
|
.message-bubble.assistant th[align="right"],
|
|
.message-bubble.assistant td[align="right"] {
|
|
text-align: right;
|
|
}
|
|
|
|
/* Links */
|
|
.message-bubble.assistant a {
|
|
color: var(--link-color);
|
|
text-decoration: none;
|
|
}
|
|
|
|
.message-bubble.assistant a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
/* Horizontal rules */
|
|
.message-bubble.assistant hr {
|
|
border: none;
|
|
border-top: 1px solid var(--hr-color);
|
|
margin: 1em 0;
|
|
}
|
|
|
|
/* Images */
|
|
.message-bubble.assistant img {
|
|
max-width: 100%;
|
|
height: auto;
|
|
display: block;
|
|
margin: 0.5em 0;
|
|
}
|
|
|
|
/* Emphasis */
|
|
.message-bubble.assistant em {
|
|
font-style: italic;
|
|
}
|
|
|
|
.message-bubble.assistant strong {
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* Strikethrough */
|
|
.message-bubble.assistant del {
|
|
text-decoration: line-through;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
/* ============================== */
|
|
/* Additional HTML Elements */
|
|
/* ============================== */
|
|
|
|
/* Keyboard input */
|
|
.message-bubble.assistant kbd {
|
|
display: inline-block;
|
|
padding: 0.2em 0.4em;
|
|
font-size: 0.875em;
|
|
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
|
|
line-height: 1;
|
|
color: var(--text-color);
|
|
vertical-align: middle;
|
|
background-color: var(--code-background-inline);
|
|
border: 1px solid var(--table-border);
|
|
border-radius: 3px;
|
|
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);
|
|
}
|
|
|
|
/* Mark/highlight */
|
|
.message-bubble.assistant mark {
|
|
background-color: #fff3cd;
|
|
color: #000;
|
|
padding: 0.2em;
|
|
border-radius: 2px;
|
|
}
|
|
|
|
/* Subscript and Superscript */
|
|
.message-bubble.assistant sub {
|
|
font-size: 0.75em;
|
|
vertical-align: sub;
|
|
}
|
|
|
|
.message-bubble.assistant sup {
|
|
font-size: 0.75em;
|
|
vertical-align: super;
|
|
}
|
|
|
|
/* Abbreviations */
|
|
.message-bubble.assistant abbr[title] {
|
|
text-decoration: underline dotted;
|
|
cursor: help;
|
|
}
|
|
|
|
/* Definition lists */
|
|
.message-bubble.assistant dl {
|
|
margin: 0.5em 0;
|
|
}
|
|
|
|
.message-bubble.assistant dt {
|
|
font-weight: 600;
|
|
margin-top: 0.5em;
|
|
}
|
|
|
|
.message-bubble.assistant dd {
|
|
margin-left: 2em;
|
|
margin-bottom: 0.5em;
|
|
}
|
|
|
|
/* Details/Summary (collapsible sections) */
|
|
.message-bubble.assistant details {
|
|
margin: 0.5em 0;
|
|
padding: 0.5em;
|
|
border: 1px solid var(--table-border);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.message-bubble.assistant summary {
|
|
cursor: pointer;
|
|
font-weight: 600;
|
|
padding: 0.25em;
|
|
}
|
|
|
|
.message-bubble.assistant details[open] summary {
|
|
margin-bottom: 0.5em;
|
|
}
|
|
|
|
/* ============================== */
|
|
/* Emoji Support */
|
|
/* ============================== */
|
|
|
|
.message-bubble.assistant .emoji {
|
|
font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
font-weight: normal;
|
|
line-height: 1;
|
|
}
|
|
|
|
/* ============================== */
|
|
/* Line Numbers for Code Blocks (optional) */
|
|
/* ============================== */
|
|
|
|
/* If using line numbers with rehype-highlight */
|
|
.hljs .code-line {
|
|
display: block;
|
|
padding-left: 1em;
|
|
margin-left: -1em;
|
|
}
|
|
|
|
.hljs .numbered-code-line::before {
|
|
content: attr(data-line-number);
|
|
display: inline-block;
|
|
width: 2em;
|
|
text-align: right;
|
|
margin-right: 1em;
|
|
color: #6a737d;
|
|
user-select: none;
|
|
}
|
|
|
|
/* ============================== */
|
|
/* Responsive adjustments */
|
|
/* ============================== */
|
|
|
|
@media (max-width: 768px) {
|
|
.message-bubble.assistant table {
|
|
font-size: 0.875em;
|
|
}
|
|
|
|
.message-bubble.assistant th,
|
|
.message-bubble.assistant td {
|
|
padding: 0.25em;
|
|
min-width: 50px;
|
|
}
|
|
|
|
.message-bubble.assistant pre {
|
|
padding: 0.25em;
|
|
}
|
|
}
|
|
|
|
/* ============================== */
|
|
/* Print styles */
|
|
/* ============================== */
|
|
|
|
@media print {
|
|
.message-bubble.assistant {
|
|
color: #000;
|
|
}
|
|
|
|
.message-bubble.assistant a {
|
|
color: #0969da;
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.message-bubble.assistant pre,
|
|
.message-bubble.assistant code {
|
|
background-color: #f6f8fa;
|
|
color: #000;
|
|
}
|
|
|
|
.hljs {
|
|
background: #fff;
|
|
color: #000;
|
|
}
|
|
} |