From 0e5252c30ceb061621ce921c84e81a3975442cbc Mon Sep 17 00:00:00 2001 From: Pawan Kumar Date: Thu, 8 May 2025 13:37:58 +0530 Subject: [PATCH] chore: fix container query bug in ai chat widget (#40607) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /ok-to-test tags="@tag.Anvil" > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: > Commit: a3a3579aaac44d2cfdfa956d46024145c4bfdad9 > Cypress dashboard. > Tags: `@tag.Anvil` > Spec: >
Thu, 08 May 2025 07:22:28 UTC ## Summary by CodeRabbit - **Style** - Introduced a named container ("flex-container") to relevant CSS classes for improved container query support. - Updated container queries to explicitly reference the new container name, enabling more precise and scoped responsive styling. --- .../design-system/widgets/src/components/Flex/src/flexCss.ts | 2 +- .../widgets/src/components/Flex/src/styles.module.css | 1 + .../layoutSystems/anvil/layoutComponents/components/styles.css | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/client/packages/design-system/widgets/src/components/Flex/src/flexCss.ts b/app/client/packages/design-system/widgets/src/components/Flex/src/flexCss.ts index d1f81e4d94..c17502d67f 100644 --- a/app/client/packages/design-system/widgets/src/components/Flex/src/flexCss.ts +++ b/app/client/packages/design-system/widgets/src/components/Flex/src/flexCss.ts @@ -97,7 +97,7 @@ export const containerDimensionStyles = ( if (current !== "base") { return ( prev + - `@container (min-width: ${current}) {& { + `@container flex-container (min-width: ${current}) {& { ${cssProp}: ${ //@ts-expect-error: type mismatch callback ? callback(value[current], extraProps) : value[current] diff --git a/app/client/packages/design-system/widgets/src/components/Flex/src/styles.module.css b/app/client/packages/design-system/widgets/src/components/Flex/src/styles.module.css index 140e79c428..82ff265193 100644 --- a/app/client/packages/design-system/widgets/src/components/Flex/src/styles.module.css +++ b/app/client/packages/design-system/widgets/src/components/Flex/src/styles.module.css @@ -1,5 +1,6 @@ .flexContainer { container-type: inline-size; + container-name: flex-container; display: flex; justify-content: center; width: 100%; diff --git a/app/client/src/layoutSystems/anvil/layoutComponents/components/styles.css b/app/client/src/layoutSystems/anvil/layoutComponents/components/styles.css index 89d39bbec9..b8b8c1ca74 100644 --- a/app/client/src/layoutSystems/anvil/layoutComponents/components/styles.css +++ b/app/client/src/layoutSystems/anvil/layoutComponents/components/styles.css @@ -1,3 +1,4 @@ .make-container { container-type: inline-size; + container-name: flex-container; }