uthvah_sync-embeds/styles.css
2025-09-22 13:26:55 +01:00

89 lines
No EOL
2.1 KiB
CSS

/* Main container for a ```sync``` code block */
.sync-container {
border: 1px solid var(--background-modifier-border);
border-radius: 8px;
padding: 16px;
background: var(--background-primary);
margin: 12px 0;
display: flex;
flex-direction: column;
gap: 16px;
}
/* Wrapper for a single `![[...]]` embed inside the container */
.sync-embed {
border: none !important;
margin: 0 !important;
padding: 0 !important;
background: transparent !important;
box-shadow: none !important;
}
/* --- SEAMLESS STYLING FOR THE EMBEDDED EDITOR --- */
.sync-embed .view-header {
display: none !important;
}
.sync-embed .view-content,
.sync-embed .markdown-source-view,
.sync-embed .cm-editor,
.sync-embed .cm-scroller {
background-color: transparent !important;
padding: 0 !important;
margin: 0 !important;
}
.sync-embed .markdown-source-view.mod-cm6 .cm-editor {
width: 100%;
}
.sync-embed .view-content {
padding: 0 var(--file-margins) !important;
}
.sync-embed .cm-s-obsidian .cm-gutters,
.sync-embed .cm-s-obsidian .cm-content {
padding-top: 0 !important;
padding-bottom: 1em !important;
}
/* --- STAGE 2 FIXES --- */
/*
* Make the inline title visible and not greyed out.
*/
.sync-embed .inline-title {
pointer-events: none; /* Disables all clicks, focus, and hover */
user-select: none; /* Prevents the user from selecting the text */
opacity: 1; /* Restores the default text color */
}
/*
* Make the header in a section embed uneditable.
*/
.uneditable-header {
pointer-events: none !important;
user-select: none !important;
opacity: 0.7 !important;
background-color: transparent !important;
}
/* --- UTILITY & ERROR STATE STYLING --- */
.sync-embed-gap {
padding-top: 16px;
border-top: 1px solid var(--background-modifier-border-hover);
}
.sync-empty {
padding: 20px;
text-align: center;
color: var(--text-muted);
font-style: italic;
}
.sync-embed-error {
padding: 8px 12px;
background: var(--background-modifier-error);
border: 1px solid var(--background-modifier-border);
border-radius: 4px;
color: var(--text-error);
}