From fd27d68fc6ae469df7870c745a14ec4fe88382e2 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Thu, 26 Jun 2025 14:19:51 -0400 Subject: [PATCH] style: add consistent margin-bottom to content embeds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add 1rem margin-bottom to all embed types (url, iframe, video, image, gallery, audio, geolocation) - Ensure YouTube embeds and URL cards have consistent spacing - Prevent double margins when embeds are adjacent - Matches the margin-bottom used for text blocks (paragraphs) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/lib/components/edra/editor.css | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/lib/components/edra/editor.css b/src/lib/components/edra/editor.css index e0fb323..a6aea26 100644 --- a/src/lib/components/edra/editor.css +++ b/src/lib/components/edra/editor.css @@ -572,3 +572,30 @@ input[type='checkbox'] { .tiptap iframe { aspect-ratio: 16 / 9; } + +/* Content Embeds - Consistent spacing with text blocks */ +.tiptap .node-urlEmbed, +.tiptap .node-iframe, +.tiptap .node-video, +.tiptap .node-image, +.tiptap .node-gallery, +.tiptap .node-audio, +.tiptap .node-geolocation { + margin-bottom: 1rem; +} + +/* YouTube embeds within urlEmbed */ +.tiptap .edra-youtube-embed-wrapper { + margin-bottom: 1rem; +} + +/* URL embed cards */ +.tiptap .edra-url-embed-wrapper { + margin-bottom: 1rem; +} + +/* Remove double margins if wrapper already has margin */ +.tiptap .edra-url-embed-wrapper + *, +.tiptap .edra-youtube-embed-wrapper + * { + margin-top: 0; +}