Skip to content

Commit 709a82a

Browse files
Add layout gap utils (#1415)
## Layout gap utils Add new utility classes for layout x/y gap. These can be used inside layout grids/flex containers for consistent layout spacing. This will also be added to horizontal image-cards in the `react`-package after this is merged. Next steps in the tailwind-package will be to add utility-classes for `layout-grid` so that we can move away from the current situation where this is duplicated in each team's code base. I think it makes sense to create a single release for this, so let's wait until remaning PR's have been approved and merged.
1 parent 8c94316 commit 709a82a

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.changeset/yellow-kings-drive.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@obosbbl/grunnmuren-tailwind": minor
3+
---
4+
5+
Add new utility classes for layout x/y gap.

packages/tailwind/tailwind-base.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,14 @@
108108
@apply bg-white grow;
109109
}
110110

111+
@utility layout-gap-x {
112+
@apply gap-x-2 sm:gap-x-4 md:gap-x-9 lg:gap-x-12 xl:gap-x-16;
113+
}
114+
115+
@utility layout-gap-y {
116+
@apply gap-y-4 sm:gap-y-6 md:gap-y-8 lg:gap-y-10 xl:gap-y-12;
117+
}
118+
111119
@utility container {
112120
@apply w-full px-(--container-gutter-width) mx-auto max-w-(--container-width);
113121
}

0 commit comments

Comments
 (0)