From 17a18097fa7943d0c889e1b4d0c74cd4090b6fa3 Mon Sep 17 00:00:00 2001 From: Ramon Date: Mon, 11 Nov 2024 20:21:25 +1100 Subject: [PATCH] Style book:reduce margin selector specificity to avoid overriding global block styles (#66895) Co-authored-by: ramonjd Co-authored-by: aaronrobertshaw --- packages/edit-site/src/components/style-book/constants.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/edit-site/src/components/style-book/constants.ts b/packages/edit-site/src/components/style-book/constants.ts index 6aa280c937d42..9aace34e64cbf 100644 --- a/packages/edit-site/src/components/style-book/constants.ts +++ b/packages/edit-site/src/components/style-book/constants.ts @@ -254,11 +254,10 @@ export const STYLE_BOOK_IFRAME_STYLES = ` .edit-site-style-book__example-preview .block-list-appender { display: none; } - - .edit-site-style-book__example-preview .is-root-container > .wp-block:first-child { + :where(.is-root-container > .wp-block:first-child) { margin-top: 0; } - .edit-site-style-book__example-preview .is-root-container > .wp-block:last-child { + :where(.is-root-container > .wp-block:last-child) { margin-bottom: 0; } `;