From 38dbc1acdba6b1284265c330ade384faf2a42131 Mon Sep 17 00:00:00 2001 From: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> Date: Mon, 13 May 2024 13:12:33 +0900 Subject: [PATCH] Ignore social links block in reset style selectors --- packages/block-library/src/reset.scss | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/block-library/src/reset.scss b/packages/block-library/src/reset.scss index cf5e5a1596df59..681e441ebfd7c8 100644 --- a/packages/block-library/src/reset.scss +++ b/packages/block-library/src/reset.scss @@ -56,20 +56,24 @@ margin: revert; } - ul, - ol { + // These resets ignore the social links block without increasing + // specificity as the block library styles include their own reset. This + // allows the block to have zero specificity styles and remain compatible + // with global styles for block themes. + ul:where(:not([class*="wp-block"])), + ol:where(:not([class*="wp-block"])) { margin: revert; padding: revert; list-style-type: revert; box-sizing: border-box; // Remove bottom margin from nested lists. - ul, - ol { + ul:where(:not([class*="wp-block"])), + ol:where(:not([class*="wp-block"])) { margin: revert; } - li { + li:where(:not([class*="wp-block"])) { margin: revert; } }