mirror of
https://github.com/uthvah/sync-embeds.git
synced 2026-07-22 06:43:40 +00:00
Hide gutter elements and adjust embed padding (#28)
This commit is contained in:
parent
8e56aeb232
commit
aa189a44c9
2 changed files with 11 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
12
styles.css
12
styles.css
|
|
@ -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%;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue