From 56da0e3db32bb31ea375f4e2d47dbcb23d6e38cd Mon Sep 17 00:00:00 2001 From: jpmarceau <39384459+jpmarceau@users.noreply.github.com> Date: Thu, 13 Jun 2024 13:56:26 -0400 Subject: [PATCH] fix(atomic): collapsed answer gradient colour (#4081) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://coveord.atlassian.net/browse/KIT-3313 Right now, the linear-gradient is hardcoded to white rather than to the background atomic colour. This will create issues when clients modify their background colour to something other than white, like we doc on the docs site when in dark mode. Screenshot 2024-06-11 at 3 34 27 PM It doesn't seem possible for clients to change the linear-gradient. Probably because it requires targeting a pseudo-element of a part with a certain class. So, in this PR, I use the atomic-background colour instead. --- .../common/generated-answer/styles/generated-answer.pcss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/atomic/src/components/common/generated-answer/styles/generated-answer.pcss b/packages/atomic/src/components/common/generated-answer/styles/generated-answer.pcss index f8190ea565d..b4f94c4bfd3 100644 --- a/packages/atomic/src/components/common/generated-answer/styles/generated-answer.pcss +++ b/packages/atomic/src/components/common/generated-answer/styles/generated-answer.pcss @@ -105,7 +105,7 @@ } &.answer-collapsed:before { @apply h-full w-full absolute top-0 left-0 content-['']; - background: linear-gradient(transparent 11.25rem, white); + background: linear-gradient(transparent 11.25rem, var(--atomic-background)); } }