From 9d0a8b9a28b5d5d1738f4f3a6fa9dd7555ce15be Mon Sep 17 00:00:00 2001 From: liyachen Date: Fri, 17 Jul 2026 17:32:19 -0400 Subject: [PATCH] fix(styles): 16:9 embed fix now applies in Live Preview too The aspect-ratio rule only matched reading-view containers (.markdown-preview-view / .markdown-rendered), so in Live Preview the iframe fell back to its fixed height="315" and rendered squashed. Add .markdown-source-view to cover CM6 html embeds. Co-Authored-By: Claude Fable 5 --- styles.css | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/styles.css b/styles.css index a570768..4f65e7c 100644 --- a/styles.css +++ b/styles.css @@ -65,11 +65,15 @@ .vap-card-deep { border-left: 3px solid #6c3fcc; } /* Video embeds the plugin writes into notes render wide at 16:9 instead of - the cramped default. Scoped to the two platforms we embed. */ + the cramped default. Scoped to the two platforms we embed. + .markdown-source-view covers Live Preview (CM6 html embeds), which the + reading-view classes don't reach. */ .markdown-preview-view iframe[src*="youtube.com"], .markdown-preview-view iframe[src*="bilibili.com"], .markdown-rendered iframe[src*="youtube.com"], -.markdown-rendered iframe[src*="bilibili.com"] { +.markdown-rendered iframe[src*="bilibili.com"], +.markdown-source-view iframe[src*="youtube.com"], +.markdown-source-view iframe[src*="bilibili.com"] { width: 100% !important; aspect-ratio: 16 / 9 !important; height: auto !important;