xmisio72_obsidian-embed-editor/styles.css
Sebastian 9e372042dd feat: Embed Editor v1.0.0 — click-to-edit panel for transclusions
Notion-style synced blocks. Click any ![[]] embed to edit its source
in a floating panel. Includes seamless-embeds.css snippet.
2026-03-27 16:46:23 +01:00

126 lines
2.4 KiB
CSS

/* Synced Edit — Obsidian source-view styled editor */
.synced-edit-modal {
max-width: 750px;
width: 90vw;
}
.synced-edit-modal .modal-content {
padding: 0;
display: flex;
flex-direction: column;
height: 100%;
}
/* Header */
.synced-edit-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 16px;
border-bottom: 1px solid var(--background-modifier-border);
font-size: 0.85em;
color: var(--text-muted);
}
.synced-edit-header-right {
display: flex;
align-items: center;
gap: 8px;
}
.synced-edit-shortcut-hint {
font-size: 0.8em;
color: var(--text-faint);
}
.synced-edit-source-link {
color: var(--text-accent);
cursor: pointer;
}
.synced-edit-source-link:hover {
text-decoration: underline;
}
.synced-edit-dirty-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--interactive-accent);
display: none;
}
.synced-edit-dirty-dot.is-dirty {
display: inline-block;
}
/* Editor area — scrollable container */
.synced-edit-editor-wrap {
min-height: 120px;
max-height: 60vh;
overflow-y: auto;
background: var(--background-primary);
}
/* Textarea styled as source editor */
.synced-edit-textarea {
flex: 1;
width: 100%;
padding: 8px 16px;
border: none !important;
outline: none !important;
background: var(--background-primary) !important;
color: var(--text-normal) !important;
font-family: var(--font-monospace) !important;
font-size: var(--font-text-size) !important;
line-height: 1.65 !important;
resize: none;
overflow: hidden;
tab-size: 4;
white-space: pre-wrap;
word-wrap: break-word;
}
.synced-edit-textarea::selection {
background: var(--text-selection);
}
.synced-edit-textarea::-webkit-scrollbar {
width: 6px;
}
.synced-edit-textarea::-webkit-scrollbar-thumb {
background: var(--scrollbar-thumb-bg);
border-radius: 3px;
}
/* Footer */
.synced-edit-footer {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 8px;
padding: 8px 16px;
border-top: 1px solid var(--background-modifier-border);
}
.synced-edit-footer button {
padding: 4px 16px;
}
.synced-edit-btn-save {
background: var(--interactive-accent) !important;
color: var(--text-on-accent) !important;
}
/* Hover hint on embeds */
.markdown-embed.synced-edit-hover {
cursor: pointer;
}
.markdown-embed.synced-edit-hover:hover {
outline: 1.5px solid var(--interactive-accent);
outline-offset: 2px;
border-radius: 4px;
}