Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion core/scripts/tokens/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,14 @@ function generateSpaceUtilityClasses(prop, className) {
};
`;

return `${marginPaddingTemplate('margin')}\n${marginPaddingTemplate('padding')}`;
// Add gap utility classes for gap tokens
const generateGapUtilityClasses = () =>`
.${variablesPrefix}-gap-${prop.name} {
gap: #{$${variablesPrefix}-${prop.name}};
};
`;

return `${generateGapUtilityClasses()}\n${marginPaddingTemplate('margin')}\n${marginPaddingTemplate('padding')}`;
}

// Generates a valid box-shadow value from a shadow Design Token structure
Expand Down
60 changes: 60 additions & 0 deletions core/src/foundations/ionic.utility.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2432,6 +2432,10 @@ Do not edit directly, this file was auto-generated.
box-shadow: $ion-elevation-4;
}

.ion-gap-space-0 {
gap: #{$ion-space-0};
}

.ion-margin-space-0 {
--margin-top: #{$ion-space-0};
--margin-end: #{$ion-space-0};
Expand Down Expand Up @@ -2498,6 +2502,10 @@ Do not edit directly, this file was auto-generated.
@include padding(null, null, null, $ion-space-0);
}

.ion-gap-space-100 {
gap: #{$ion-space-100};
}

.ion-margin-space-100 {
--margin-top: #{$ion-space-100};
--margin-end: #{$ion-space-100};
Expand Down Expand Up @@ -2564,6 +2572,10 @@ Do not edit directly, this file was auto-generated.
@include padding(null, null, null, $ion-space-100);
}

.ion-gap-space-150 {
gap: #{$ion-space-150};
}

.ion-margin-space-150 {
--margin-top: #{$ion-space-150};
--margin-end: #{$ion-space-150};
Expand Down Expand Up @@ -2630,6 +2642,10 @@ Do not edit directly, this file was auto-generated.
@include padding(null, null, null, $ion-space-150);
}

.ion-gap-space-200 {
gap: #{$ion-space-200};
}

.ion-margin-space-200 {
--margin-top: #{$ion-space-200};
--margin-end: #{$ion-space-200};
Expand Down Expand Up @@ -2696,6 +2712,10 @@ Do not edit directly, this file was auto-generated.
@include padding(null, null, null, $ion-space-200);
}

.ion-gap-space-250 {
gap: #{$ion-space-250};
}

.ion-margin-space-250 {
--margin-top: #{$ion-space-250};
--margin-end: #{$ion-space-250};
Expand Down Expand Up @@ -2762,6 +2782,10 @@ Do not edit directly, this file was auto-generated.
@include padding(null, null, null, $ion-space-250);
}

.ion-gap-space-300 {
gap: #{$ion-space-300};
}

.ion-margin-space-300 {
--margin-top: #{$ion-space-300};
--margin-end: #{$ion-space-300};
Expand Down Expand Up @@ -2828,6 +2852,10 @@ Do not edit directly, this file was auto-generated.
@include padding(null, null, null, $ion-space-300);
}

.ion-gap-space-400 {
gap: #{$ion-space-400};
}

.ion-margin-space-400 {
--margin-top: #{$ion-space-400};
--margin-end: #{$ion-space-400};
Expand Down Expand Up @@ -2894,6 +2922,10 @@ Do not edit directly, this file was auto-generated.
@include padding(null, null, null, $ion-space-400);
}

.ion-gap-space-500 {
gap: #{$ion-space-500};
}

.ion-margin-space-500 {
--margin-top: #{$ion-space-500};
--margin-end: #{$ion-space-500};
Expand Down Expand Up @@ -2960,6 +2992,10 @@ Do not edit directly, this file was auto-generated.
@include padding(null, null, null, $ion-space-500);
}

.ion-gap-space-600 {
gap: #{$ion-space-600};
}

.ion-margin-space-600 {
--margin-top: #{$ion-space-600};
--margin-end: #{$ion-space-600};
Expand Down Expand Up @@ -3026,6 +3062,10 @@ Do not edit directly, this file was auto-generated.
@include padding(null, null, null, $ion-space-600);
}

.ion-gap-space-700 {
gap: #{$ion-space-700};
}

.ion-margin-space-700 {
--margin-top: #{$ion-space-700};
--margin-end: #{$ion-space-700};
Expand Down Expand Up @@ -3092,6 +3132,10 @@ Do not edit directly, this file was auto-generated.
@include padding(null, null, null, $ion-space-700);
}

.ion-gap-space-800 {
gap: #{$ion-space-800};
}

.ion-margin-space-800 {
--margin-top: #{$ion-space-800};
--margin-end: #{$ion-space-800};
Expand Down Expand Up @@ -3158,6 +3202,10 @@ Do not edit directly, this file was auto-generated.
@include padding(null, null, null, $ion-space-800);
}

.ion-gap-space-900 {
gap: #{$ion-space-900};
}

.ion-margin-space-900 {
--margin-top: #{$ion-space-900};
--margin-end: #{$ion-space-900};
Expand Down Expand Up @@ -3224,6 +3272,10 @@ Do not edit directly, this file was auto-generated.
@include padding(null, null, null, $ion-space-900);
}

.ion-gap-space-1000 {
gap: #{$ion-space-1000};
}

.ion-margin-space-1000 {
--margin-top: #{$ion-space-1000};
--margin-end: #{$ion-space-1000};
Expand Down Expand Up @@ -3290,6 +3342,10 @@ Do not edit directly, this file was auto-generated.
@include padding(null, null, null, $ion-space-1000);
}

.ion-gap-space-1200 {
gap: #{$ion-space-1200};
}

.ion-margin-space-1200 {
--margin-top: #{$ion-space-1200};
--margin-end: #{$ion-space-1200};
Expand Down Expand Up @@ -3356,6 +3412,10 @@ Do not edit directly, this file was auto-generated.
@include padding(null, null, null, $ion-space-1200);
}

.ion-gap-space-050 {
gap: #{$ion-space-050};
}

.ion-margin-space-050 {
--margin-top: #{$ion-space-050};
--margin-end: #{$ion-space-050};
Expand Down
Loading