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 <noreply@anthropic.com>
This commit is contained in:
liyachen 2026-07-17 17:32:19 -04:00
parent e0c39433fa
commit 9d0a8b9a28

View file

@ -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;