Hide gutter elements and adjust embed padding (#28)

This commit is contained in:
Oleh Ivaniuk 2026-02-26 09:59:42 +02:00 committed by GitHub
parent 8e56aeb232
commit aa189a44c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 6 deletions

View file

@ -69,6 +69,11 @@ class ViewportController {
[data-embed-id="${embedId}"] .cm-line:nth-child(n+${domEndLine + 1}) {
display: none !important;
}
/* Catch-all to prevent overlapping text in collapsed line numbers */
[data-embed-id="${embedId}"] .cm-gutterElement[style*="height: 0px"]:not([style*="visibility: hidden"]) {
display: none !important;
}
`;
style.textContent = css;

View file

@ -30,11 +30,6 @@
border-radius: 4px; /* Optional rounding for callouts */
}
/* Compensate top padding when in callout mode to match bottom padding */
.sync-embed.is-callout-style .cm-content {
padding-top: 12px !important;
}
/* === UNIFIED UI HEADER === */
.sync-embed-header {
font-size: var(--inline-title-size, var(--h1-size, 2em));
@ -165,12 +160,17 @@
/* 16px padding creates a flush left edge */
.sync-embed .cm-content {
background-color: transparent !important;
padding-top: 12px !important;
/* padding-top: 12px !important; */
padding-bottom: 12px !important;
padding-left: 16px !important;
padding-right: 16px !important;
}
/* Applying general padding to the container keeps both line numbers and content vertically aligned */
.sync-embed .cm-contentContainer {
padding-top: 12px !important;
}
.sync-embed .markdown-source-view.mod-cm6 .cm-editor {
width: 100%;
}