Skip to content

Commit 9f8aa30

Browse files
committed
restore negative marginLeft
1 parent 9b9b8f0 commit 9f8aa30

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

packages/bento-design-system/src/Layout/Column.css.ts

+3-6
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@ import { Breakpoint, breakpoints } from "../util/breakpoints";
44

55
export const columnsSpace = createVar("columns-space");
66

7-
export const column = style({});
7+
export const columns = style({
8+
marginLeft: `calc(${columnsSpace} * -1)`,
9+
});
810

911
export const columnContent = style({
1012
marginLeft: columnsSpace,
11-
selectors: {
12-
[`${column}:first-child &`]: {
13-
marginLeft: 0,
14-
},
15-
},
1613
});
1714

1815
const styleForScale = (scale: number): StyleRule => ({

packages/bento-design-system/src/Layout/Columns.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
mobileWidths,
1717
fullWidth,
1818
columnsSpace,
19-
column,
19+
columns,
2020
columnContent,
2121
} from "./Column.css";
2222
import { assignInlineVars } from "@vanilla-extract/dynamic";
@@ -36,9 +36,8 @@ export function Column({ children, width, sticky }: ColumnProps) {
3636

3737
const className =
3838
width == null
39-
? [column, fullWidth]
39+
? fullWidth
4040
: [
41-
column,
4241
wide && wideWidths[wide],
4342
desktop && desktopWidths[desktop],
4443
tablet && tabletWidths[tablet],
@@ -65,6 +64,7 @@ export function Columns({ space, children, align, alignY, collapseBelow, reverse
6564
display="flex"
6665
{...responsiveCollapsibleAlignmentProps({ align, alignY, collapseBelow, reverse })}
6766
style={assignInlineVars({ [columnsSpace]: `${space}px` })}
67+
className={columns}
6868
>
6969
{flattenChildren(children).map((child, index) => {
7070
if (isColumn(child)) {

0 commit comments

Comments
 (0)