2025-06-07 01:30:17 +00:00
|
|
|
/* Variant Editor Plugin Styles */
|
2025-06-05 02:50:55 +00:00
|
|
|
|
2025-06-07 01:30:17 +00:00
|
|
|
/* Dimmed lines */
|
2025-06-07 05:07:59 +00:00
|
|
|
.markdown-source-view .cm-line.fh-dim,
|
|
|
|
|
.cm-line.fh-dim {
|
2025-06-07 01:30:17 +00:00
|
|
|
opacity: 0.25;
|
|
|
|
|
}
|
2025-06-05 02:50:55 +00:00
|
|
|
|
2025-06-07 01:30:17 +00:00
|
|
|
/* Active line (contains the selected text) */
|
|
|
|
|
.markdown-source-view .cm-line.fh-active {
|
|
|
|
|
opacity: 1 !important;
|
|
|
|
|
position: relative;
|
|
|
|
|
z-index: 1;
|
|
|
|
|
background-color: var(--background-primary);
|
|
|
|
|
border-radius: 2px;
|
|
|
|
|
box-shadow: 0 0 0 1px var(--background-modifier-border);
|
|
|
|
|
}
|
2025-06-05 02:50:55 +00:00
|
|
|
|
2025-06-07 01:30:17 +00:00
|
|
|
/* When in sentence mode, make the active line more subtle */
|
|
|
|
|
.markdown-source-view .cm-line.fh-active:not(.fh-dim) {
|
|
|
|
|
background-color: var(--background-primary);
|
|
|
|
|
box-shadow: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Highlighted text */
|
|
|
|
|
.fh-highlight {
|
|
|
|
|
background-color: var(--text-highlight-bg);
|
|
|
|
|
color: var(--text-normal) !important;
|
2025-06-10 04:08:42 +00:00
|
|
|
/* Use the same styling approach as native selection */
|
|
|
|
|
padding: 0;
|
|
|
|
|
margin: 0;
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
z-index: 1;
|
2025-06-07 15:34:32 +00:00
|
|
|
position: relative;
|
2025-06-10 04:08:42 +00:00
|
|
|
box-shadow: none;
|
2025-06-07 01:30:17 +00:00
|
|
|
}
|
2025-06-07 02:03:15 +00:00
|
|
|
|
2025-06-07 15:34:32 +00:00
|
|
|
/* Make highlighted text stand out even when selected */
|
|
|
|
|
.cm-line .cm-selectionBackground ~ .fh-highlight,
|
|
|
|
|
.cm-line .cm-selectionBackground + .fh-highlight,
|
|
|
|
|
.cm-line .fh-highlight.cm-selectionBackground {
|
2025-06-10 04:08:42 +00:00
|
|
|
background-color: rgba(255, 207, 64, 0.6) !important; /* Lighter yellow that shows through selection */
|
|
|
|
|
mix-blend-mode: normal;
|
|
|
|
|
opacity: 1;
|
2025-06-07 15:34:32 +00:00
|
|
|
}
|
|
|
|
|
|
2025-06-07 18:06:17 +00:00
|
|
|
/* Variant indicator styles */
|
|
|
|
|
.variant-indicator {
|
|
|
|
|
background-color: rgba(121, 184, 255, 0.2);
|
|
|
|
|
border-bottom: 1px dashed #79b8ff;
|
|
|
|
|
border-radius: 2px;
|
|
|
|
|
position: relative;
|
2025-06-07 23:08:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Hide variant syntax parts */
|
|
|
|
|
.variant-syntax-start,
|
|
|
|
|
.variant-syntax-end,
|
|
|
|
|
.variant-inactive-option {
|
|
|
|
|
display: inline;
|
|
|
|
|
color: transparent;
|
|
|
|
|
font-size: 0;
|
|
|
|
|
position: relative;
|
|
|
|
|
pointer-events: auto;
|
|
|
|
|
cursor: text;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Show a small indicator for hidden parts when hovered */
|
|
|
|
|
.variant-syntax-start:hover,
|
|
|
|
|
.variant-syntax-end:hover,
|
|
|
|
|
.variant-inactive-option:hover {
|
|
|
|
|
background-color: rgba(121, 184, 255, 0.3);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Active variant option */
|
|
|
|
|
.variant-active-option {
|
|
|
|
|
display: inline;
|
|
|
|
|
background-color: rgba(121, 184, 255, 0.2);
|
|
|
|
|
border-bottom: 1px dashed #79b8ff;
|
|
|
|
|
border-radius: 2px;
|
|
|
|
|
position: relative;
|
|
|
|
|
pointer-events: auto;
|
2025-06-07 18:06:17 +00:00
|
|
|
z-index: 5;
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-10 04:28:10 +00:00
|
|
|
/* Style for clickable variants */
|
|
|
|
|
.clickable-variant {
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
border-bottom: 1px dotted var(--interactive-accent);
|
|
|
|
|
transition: background-color 0.15s ease;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.clickable-variant:hover {
|
|
|
|
|
background-color: var(--background-modifier-hover);
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-07 02:03:15 +00:00
|
|
|
/* Modal styles */
|
2025-06-10 06:18:56 +00:00
|
|
|
/* Header with title and close button inline */
|
|
|
|
|
.variant-editor-header {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
margin-bottom: 15px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.variant-editor-header h2 {
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 0;
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-07 18:06:17 +00:00
|
|
|
.variant-editor-container {
|
|
|
|
|
margin-bottom: 15px;
|
|
|
|
|
max-height: 300px;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
padding-right: 5px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.variant-editor-row {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
margin-bottom: 8px;
|
|
|
|
|
padding: 6px;
|
2025-06-07 02:03:15 +00:00
|
|
|
border-radius: 4px;
|
2025-06-07 18:06:17 +00:00
|
|
|
background-color: var(--background-primary-alt);
|
2025-06-10 06:18:56 +00:00
|
|
|
cursor: pointer;
|
|
|
|
|
position: relative;
|
|
|
|
|
transition: background-color 0.15s ease;
|
2025-06-07 18:06:17 +00:00
|
|
|
}
|
|
|
|
|
|
2025-06-10 06:18:56 +00:00
|
|
|
.variant-editor-row:hover {
|
|
|
|
|
background-color: var(--background-modifier-hover);
|
2025-06-07 18:06:17 +00:00
|
|
|
}
|
|
|
|
|
|
2025-06-10 06:18:56 +00:00
|
|
|
/* Rainbow border for active variant */
|
|
|
|
|
.variant-editor-row-active {
|
|
|
|
|
position: relative;
|
|
|
|
|
background-color: var(--background-secondary);
|
|
|
|
|
margin-bottom: 8px;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
/* Remove default border */
|
|
|
|
|
border: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Create rainbow border with pseudo-element */
|
|
|
|
|
.variant-editor-row-active::before {
|
|
|
|
|
content: '';
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: -2px;
|
|
|
|
|
left: -2px;
|
|
|
|
|
right: -2px;
|
|
|
|
|
bottom: -2px;
|
|
|
|
|
background: linear-gradient(45deg, #ff5e5e, #ffdb4d, #52fa5a, #4db8ff, #c878ff);
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
z-index: -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Create inner background to make border appear as outline */
|
|
|
|
|
.variant-editor-row-active::after {
|
|
|
|
|
content: '';
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
right: 0;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
background-color: var(--background-secondary);
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
z-index: -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Make sure the container doesn't clip the border */
|
|
|
|
|
.variant-editor-container {
|
|
|
|
|
padding: 0;
|
|
|
|
|
overflow: visible;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Drag handle styling */
|
|
|
|
|
.variant-editor-drag-handle {
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
margin-right: 8px;
|
|
|
|
|
color: var(--text-muted);
|
|
|
|
|
cursor: grab;
|
2025-06-07 18:06:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.variant-editor-label {
|
|
|
|
|
width: 80px;
|
|
|
|
|
font-weight: 500;
|
2025-06-07 02:03:15 +00:00
|
|
|
color: var(--text-normal);
|
2025-06-07 18:06:17 +00:00
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.variant-editor-input {
|
|
|
|
|
flex-grow: 1;
|
|
|
|
|
padding: 6px 10px;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
border: 1px solid var(--background-modifier-border);
|
|
|
|
|
background-color: var(--background-primary);
|
2025-06-07 02:03:15 +00:00
|
|
|
font-family: var(--font-text);
|
2025-06-07 18:06:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.variant-editor-input:focus {
|
|
|
|
|
border-color: var(--interactive-accent);
|
|
|
|
|
box-shadow: 0 0 0 2px rgba(var(--interactive-accent-rgb), 0.2);
|
|
|
|
|
outline: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.variant-editor-delete-button {
|
|
|
|
|
margin-left: 8px;
|
|
|
|
|
width: 24px;
|
|
|
|
|
height: 24px;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
background-color: var(--background-modifier-error-rgb);
|
|
|
|
|
color: white;
|
|
|
|
|
border: none;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
padding: 0;
|
|
|
|
|
line-height: 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.variant-editor-delete-button:hover {
|
|
|
|
|
background-color: var(--text-error);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.variant-editor-add-container {
|
|
|
|
|
margin-bottom: 15px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.variant-editor-add-button {
|
|
|
|
|
background-color: var(--interactive-accent) !important;
|
|
|
|
|
color: var(--text-on-accent) !important;
|
|
|
|
|
padding: 4px 12px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.variant-editor-buttons {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
gap: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.variant-editor-button {
|
|
|
|
|
flex: 1;
|
|
|
|
|
padding: 8px 12px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.variant-editor-commit-button {
|
|
|
|
|
background-color: var(--color-green) !important;
|
|
|
|
|
color: var(--text-on-accent) !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.variant-editor-original-text {
|
|
|
|
|
margin-bottom: 15px;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
color: var(--text-normal);
|
|
|
|
|
padding: 8px;
|
|
|
|
|
background-color: var(--background-secondary);
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.variant-editor-hint {
|
2025-06-07 19:17:12 +00:00
|
|
|
margin-top: 10px;
|
|
|
|
|
margin-bottom: 10px;
|
2025-06-07 18:06:17 +00:00
|
|
|
color: var(--text-muted);
|
|
|
|
|
font-size: 0.9em;
|
2025-06-07 02:03:15 +00:00
|
|
|
}
|
|
|
|
|
|
2025-06-07 19:17:12 +00:00
|
|
|
/* Style the variant editor modal */
|
|
|
|
|
.variant-editor-modal {
|
|
|
|
|
width: 400px !important;
|
|
|
|
|
max-width: 90vw !important;
|
|
|
|
|
max-height: 80vh !important;
|
|
|
|
|
overflow-y: auto !important;
|
|
|
|
|
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15) !important;
|
|
|
|
|
border: 1px solid var(--background-modifier-border) !important;
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-07 19:27:31 +00:00
|
|
|
/* When modal is positioned above the highlighted line, make it grow upward */
|
|
|
|
|
.variant-editor-modal-above .variant-editor-flex-container {
|
|
|
|
|
display: flex !important;
|
|
|
|
|
flex-direction: column-reverse !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.variant-editor-flex-container {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-10 03:49:52 +00:00
|
|
|
/* Remove background dimming for variant editor modal */
|
|
|
|
|
.variant-editor-no-dim ~ .modal-bg {
|
|
|
|
|
background-color: transparent !important;
|
|
|
|
|
backdrop-filter: none !important;
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-07 02:03:15 +00:00
|
|
|
.variant-editor-textarea:focus {
|
|
|
|
|
outline: none;
|
|
|
|
|
border-color: var(--interactive-accent);
|
|
|
|
|
box-shadow: 0 0 0 2px rgba(var(--interactive-accent-rgb), 0.2);
|
|
|
|
|
}
|