fix: find the width cap by measuring, not by class name
Measured chain from live preview showed the cap on .cm-content at 700px, while .cm-sizer - the element closest() matched first - is already uncapped at 1680px. The class-name shortcut therefore locked onto the wrong element and returned before the fallback walk could find the real one, so the cap survived and the container query correctly collapsed the grid to one column. widenHost now always measures computed max-width outward from the dashboard's parent. The decision is extracted as firstCappedIndex and tested against the real measured chains for both live preview and reading view, so a class-name assumption cannot silently break it again. Adds .cm-content to the CSS fallback.
This commit is contained in:
4
.obsidian/plugins/webinar-dash/styles.css
vendored
4
.obsidian/plugins/webinar-dash/styles.css
vendored
@@ -87,8 +87,8 @@
|
||||
------------------------------------------------------------------ */
|
||||
.markdown-preview-sizer:has(.webinar-dash),
|
||||
.markdown-preview-view.is-readable-line-width .markdown-preview-sizer:has(.webinar-dash),
|
||||
.markdown-source-view.mod-cm6 .cm-sizer:has(.webinar-dash),
|
||||
.markdown-source-view.mod-cm6.is-readable-line-width .cm-sizer:has(.webinar-dash) {
|
||||
.markdown-source-view.mod-cm6 .cm-content:has(.webinar-dash),
|
||||
.markdown-source-view.mod-cm6 .cm-sizer:has(.webinar-dash) {
|
||||
max-width: none !important;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user