Changeset 0.22.9 (#151)

This commit is contained in:
2026-03-04 17:39:22 +00:00
parent 7e26a2a261
commit 6ed76fb2d3
27 changed files with 3392 additions and 3224 deletions

View File

@@ -348,13 +348,18 @@ function popOutExtBlock(blockId) {
const lang = block.getAttribute('data-ext-lang') || '';
// Read current theme colors so the iframe respects light/dark mode
const cs = getComputedStyle(document.documentElement);
const bgColor = cs.getPropertyValue('--bg-surface').trim() || '#fff';
const textColor = cs.getPropertyValue('--text').trim() || '#1a1a2e';
// Wrap in a minimal HTML document for the iframe
const html = `<!DOCTYPE html>
<html><head>
<meta charset="utf-8">
<style>
body { margin: 0; padding: 16px; display: flex; justify-content: center;
align-items: flex-start; min-height: 100vh; background: #fff;
align-items: flex-start; min-height: 100vh; background: ${bgColor}; color: ${textColor};
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body > * { max-width: 100%; }
svg { max-width: 100%; height: auto; }