Skip to content

Commit

Permalink
feat(utils): add gap utility classes
Browse files Browse the repository at this point in the history
  • Loading branch information
silviyaboteva authored and joneff committed Oct 17, 2021
1 parent 9386a0f commit 8a1f8e0
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions packages/default/scss/utils/_spacing.scss
Expand Up @@ -111,4 +111,28 @@
}
}

// @name k-gap-VALUE
// @description This is equivalent to `gap: VALUE;`. Gap area between both rows and columns in grid and flexbox layouts.
// @group spacing

// @name k-gap-x-VALUE
// @description This is equivalent to `column-gap: VALUE;`. Gap area between columns in grid and flexbox layouts.
// @group spacing

// @name k-gap-y-VALUE
// @description This is equivalent to `row-gap: VALUE;`. Gap area between rows in grid and flexbox layouts.
// @group spacing

// Gap
.k-no-gap { gap: 0 !important; }

@each $size, $val in $spacing {
.k-gap-#{$size} { gap: $val; }
.k-gap-x-#{$size} { column-gap: $val; }
.k-gap-y-#{$size} { row-gap: $val; }

.\!k-gap-#{$size} { gap: $val !important; }
.\!k-gap-x-#{$size} { column-gap: $val !important; }
.\!k-gap-y-#{$size} { row-gap: $val !important; }
}
}

0 comments on commit 8a1f8e0

Please sign in to comment.