Hello, I'm trying to get something consistent with the Markdown Viewer plugin.
Images with a single line break are on the same line. You will get all badges on a single line.
I have this (tested with Zettlr 4 beta 2):
.ͼv .cm-quote {
font-style: normal;
}
.ͼw .cm-quote {
font-style: normal;
}
body:not(.dark) {
--system-accent-color: #222222;
--system-accent-color-contrast: #ffffffff;
/* Header Font Sizes */
span.cm-header-1.cm-content-span {
color: black;
}
span.cm-header-2.cm-content-span {
color: black;
}
span.cm-header-3.cm-content-span {
color: black;
}
span.cm-header-4.cm-content-span {
color: black;
}
span.cm-header-5.cm-content-span {
color: black;
}
span.cm-header-6.cm-content-span {
color: black;
}
.cm-url,
.cm-link,
.cm-code-mark,
.cm-zkn-tag,
.cm-zkn-link {
color: #0F68DC !important;
}
}
:root {
--system-accent-color: #ff0000 !important;
}
body.dark {
--system-accent-color: #222222;
--system-accent-color-contrast: #ffffffff;
.cm-editor {
background-color: #0D1116 !important;
}
#file-tree,
#file-tree .tree-view,
#sidebar,
#sidebar .sidebar {
background-color: #0D1116 !important;
}
/* Header Font Sizes */
span.cm-header-1.cm-content-span {
color: white;
}
span.cm-header-2.cm-content-span {
color: white;
}
span.cm-header-3.cm-content-span {
color: white;
}
span.cm-header-4.cm-content-span {
color: white;
}
span.cm-header-5.cm-content-span {
color: white;
}
span.cm-header-6.cm-content-span {
color: white;
}
.cm-url,
.cm-link,
.cm-code-mark,
.cm-zkn-tag,
.cm-zkn-link {
color: #4891FF !important;
}
}
body div.tree-item-container .tree-item.selected .display-text {
background-color: #0F68DC;
color: #ffffffff;
}
.cm-line {
position: relative;
}
/* Supprime toute bordure sur les fragments */
.cm-quote,
.cm-formatting-quote,
.cm-formatting--quote {
border-left: none !important;
padding-left: 0 !important;
margin-left: 0 !important;
}
body:not(.dark) {
.cm-quote {
font-size: 16px;
color: #646B73;
}
.cm-editor .cm-line:has(.cm-quote),
.cm-editor .cm-line:has(.cm-formatting-quote),
.cm-editor .cm-line:has(.cm-formatting--quote) {
box-shadow: inset 4px 0 0 0 #d0d7de;
background-color: transparent;
}
}
body.dark {
.cm-quote {
font-size: 16px;
color: #848d97;
}
.cm-editor .cm-line:has(.cm-quote),
.cm-editor .cm-line:has(.cm-formatting-quote),
.cm-editor .cm-line:has(.cm-formatting--quote) {
box-shadow: inset 4px 0 0 0 #35383F;
background-color: transparent;
}
}
/* Editor Font */
div.cm-line {
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI";
font-size: 16px;
}
/* Code Inline Font */
span.cm-list.cm-content-span.cm-monospace {
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI";
font-size: 16px;
}
body .main-editor-wrapper .cm-hr {
display: block;
width: 100vw;
margin-left: calc(-50vw + 50%);
border: none;
border-top: 2px solid #AAAAAA;
height: 0;
background: none;
box-sizing: border-box;
}
/* Text Font Sizes */
span.cm-link {
font-size: 18px;
}
span.cm-lintRange {
font-size: 18px;
}
span.cm-content-span {
font-size: 18px;
}
/* Header Font Sizes */
span.cm-header-1.cm-content-span {
font-size: 30px;
}
span.cm-header-2.cm-content-span {
font-size: 28px;
}
span.cm-header-3.cm-content-span {
font-size: 26px;
}
span.cm-header-4.cm-content-span {
font-size: 24px;
}
span.cm-header-5.cm-content-span {
font-size: 26px;
}
span.cm-header-6.cm-content-span {
font-size: 22px;
}
/* ========================================
GESTION DES BADGES/IMAGES INLINE
======================================== */
/* Supprime les buffers parasites de CodeMirror */
.cm-line img.cm-widgetBuffer {
display: none !important;
}
/* TOUTES les lignes avec badge deviennent inline */
.cm-line:has(figure.image-preview) {
display: inline !important;
}
/* Supprime tout espacement entre lignes consécutives de badges */
.cm-line:has(figure.image-preview) ~ .cm-line:has(figure.image-preview) {
margin-left: 0 !important;
margin-top: 0 !important;
padding-left: 0 !important;
}
/* Chaque figure en inline-block avec espacement minimal */
.cm-line figure.image-preview {
display: inline-block !important;
vertical-align: middle !important;
margin: 0 2px 0 0 !important; /* Seulement 2px à droite */
padding: 0 !important;
max-width: none !important;
}
/* Images dans les figures */
.cm-line figure.image-preview img {
display: block !important;
margin: 0 !important;
padding: 0 !important;
vertical-align: middle !important;
}