Steps to reproduce
In live preview mode,
- Set the background color of
.cm-sizer
to green. - Set the background color of
.metadata-container
to red. - Set the background color of
.cm-contentContainer
to red.
In reading mode,
- Set the background color of
.metadata-container
to red. - Set the background color of
.mod-header.mod-ui
to green.
Here are the relevant CSS:
.markdown-source-view .metadata-container {
background: red;
}
/* live preview mode part */
.markdown-source-view.mod-cm6.is-readable-line-width .cm-sizer {
background: green;
}
.markdown-source-view.mod-cm6 .cm-contentContainer {
background: red;
}
/* reading mode part */
.mod-header.mod-ui {
background: green;
}
Did you follow the troubleshooting guide? [Y/N]
Y
Expected result
You will notice that the two red rectangles are not aligned. Specifically, the .metadata-container
is positioned to the left.
I have attached the screenshot at the end of the document.
Actual result
The red square and the green square perfectly overlap. (see screenshorts)
Environment
SYSTEM INFO:
Obsidian version: v1.8.7
Installer version: v1.6.7
Operating system: Darwin Kernel Version 24.3.0: Thu Jan 2 20:24:23 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T8122 24.3.0
Login status: not logged in
Language: en
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on
RECOMMENDATIONS:
none
Additional information
This makes implementing complex CSS alignments related to it very difficult.
Live preview mode:
Reading mode: