From a4156a07b59d7ac4bf6786895d96b8406e5f0eec Mon Sep 17 00:00:00 2001 From: Andrew Serong <14988353+andrewserong@users.noreply.github.com> Date: Tue, 27 Feb 2024 14:04:26 +1100 Subject: [PATCH] Cover Block: Restore overflow: clip rule to allow border radius again (#59388) * Cover Block: Restore overflow: clip rule to allow border radius again * Fully restore to prior to aspect ratio PR Co-authored-by: andrewserong Co-authored-by: ramonjd Co-authored-by: tellthemachines Co-authored-by: luminuu --- packages/block-library/src/cover/style.scss | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/cover/style.scss b/packages/block-library/src/cover/style.scss index 3b4eac41a0d3b..837e3834e2e1b 100644 --- a/packages/block-library/src/cover/style.scss +++ b/packages/block-library/src/cover/style.scss @@ -8,9 +8,10 @@ align-items: center; padding: 1em; // Prevent the `wp-block-cover__background` span from overflowing the container when border-radius is applied. + // `overflow: hidden` is provided as a fallback for browsers that don't support `overflow: clip`. + overflow: hidden; // Use clip instead of overflow: hidden so that sticky position works on child elements. - // Use overflow-x instead of overflow so that aspect-ratio allows content to expand the area of the cover block. - overflow-x: clip; + overflow: clip; // This block has customizable padding, border-box makes that more predictable. box-sizing: border-box; // Keep the flex layout direction to the physical direction (LTR) in RTL languages.