Skip to content

Commit f9af78e

Browse files
committed
Feat(web): Add spacingX and spacingY to Flex #DS-1427
1 parent 9915f79 commit f9af78e

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

packages/web/src/scss/components/Flex/_Flex.scss

+13-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,14 @@
1212
.Flex {
1313
@include reset.list();
1414
@include spacing.create(
15-
$output-property-name: '--flex-gap',
16-
$responsive-property-base-name: '--flex-spacing',
15+
$output-property-name: '--flex-gap-y',
16+
$responsive-property-base-name: '--flex-spacing-y',
17+
$breakpoints: theme.$breakpoints,
18+
$default-spacing: theme.$gap
19+
);
20+
@include spacing.create(
21+
$output-property-name: '--flex-gap-x',
22+
$responsive-property-base-name: '--flex-spacing-x',
1723
$breakpoints: theme.$breakpoints,
1824
$default-spacing: theme.$gap
1925
);
@@ -26,7 +32,11 @@
2632
// stylelint-disable-next-line selector-max-universal -- Let's be bold and tweak all direct descendants regardless of their type to avoid inheritance of spacing for nested Flex.
2733
.Flex > * {
2834
@include spacing.prevent-inheritance(
29-
$responsive-property-base-name: '--flex-spacing',
35+
$responsive-property-base-name: '--flex-spacing-x',
36+
$breakpoints: theme.$breakpoints
37+
);
38+
@include spacing.prevent-inheritance(
39+
$responsive-property-base-name: '--flex-spacing-y',
3040
$breakpoints: theme.$breakpoints
3141
);
3242
}

0 commit comments

Comments
 (0)