Skip to content

Commit f85a948

Browse files
refactor: use named container query for Columns component (#222)
Update the `Columns` component and its Storybook examples to utilize a named container query (`columns-container`). This provides explicit targeting for container query breakpoints, enhancing isolation and specificity of responsive behaviors, and preventing potential conflicts in complex or nested layouts.
1 parent 34bb8cf commit f85a948

4 files changed

Lines changed: 9 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.0.13] - 2026-03-19
6+
7+
### Changed
8+
9+
- Changed `Columns` to use named container query (`columns-container`) (#222)
10+
511
## [1.0.12] - 2026-03-18
612

713
### Changed

packages/components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mintlify/components",
3-
"version": "1.0.12",
3+
"version": "1.0.13",
44
"description": "Mintlify open-source UI components",
55
"type": "module",
66
"main": "./dist/index.cjs",

packages/components/src/components/columns/columns.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export const FourColumns: Story = {
6868
*/
6969
export const InsideContainer: StoryObj = {
7070
render: () => (
71-
<div className="@container resize overflow-hidden border p-8">
71+
<div className="@container/columns-container resize overflow-hidden border p-8">
7272
<Columns cols={3}>
7373
<Box>1</Box>
7474
<Box>2</Box>

packages/components/src/components/columns/columns.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const Columns = ({
2323
Classes.Columns,
2424
"prose dark:prose-invert grid max-w-none gap-4",
2525
"sm:grid-cols-[repeat(var(--cols),minmax(0,1fr))]",
26-
"@[0px]:grid-cols-1 @sm:grid-cols-[repeat(var(--cols),minmax(0,1fr))]",
26+
"@[0px]/columns-container:grid-cols-1 @sm/columns-container:grid-cols-[repeat(var(--cols),minmax(0,1fr))]",
2727
className
2828
)}
2929
style={{ "--cols": numCols } as React.CSSProperties}

0 commit comments

Comments
 (0)