From e34813fe8f30358cd1396ceea114569a4cdabf8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20D=C3=A9ramond?= Date: Tue, 29 Oct 2024 16:21:47 +0100 Subject: [PATCH] Enhance popover arrow rendering when popover has a header --- scss/_popover.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scss/_popover.scss b/scss/_popover.scss index 7b69f62328..fbb3103bcb 100644 --- a/scss/_popover.scss +++ b/scss/_popover.scss @@ -119,6 +119,12 @@ top: var(--#{$prefix}popover-border-width); border-bottom-color: var(--#{$prefix}popover-bg); } + + // `:has` is not yet supported by our `.browserlistrc` but since it adds an extra layer of specificity, + // it doesn't hurt the browsers that don't support it. + &:has(+ .popover-header)::after { + --#{$prefix}popover-bg: var(--#{$prefix}popover-header-bg); + } } // This will remove the popover-header's border just below the arrow