wildebeest/frontend/src/styles/spacing.scss

97 wiersze
1.7 KiB
SCSS

@use 'sass:list';
@use './theme.scss';
// padding
@for $i from 0 through 9 {
.p-#{$i} {
padding: list.nth(theme.$space_scale, $i + 1);
}
}
@for $i from 0 through 9 {
.px-#{$i} {
padding-left: list.nth(theme.$space_scale, $i + 1);
padding-right: list.nth(theme.$space_scale, $i + 1);
}
}
@for $i from 0 through 9 {
.py-#{$i} {
padding-top: list.nth(theme.$space_scale, $i + 1);
padding-bottom: list.nth(theme.$space_scale, $i + 1);
}
}
@for $i from 0 through 9 {
.pt-#{$i} {
padding-top: list.nth(theme.$space_scale, $i + 1);
}
}
@for $i from 0 through 9 {
.pb-#{$i} {
padding-bottom: list.nth(theme.$space_scale, $i + 1);
}
}
@for $i from 0 through 9 {
.pr-#{$i} {
padding-right: list.nth(theme.$space_scale, $i + 1);
}
}
@for $i from 0 through 9 {
.pl-#{$i} {
padding-left: list.nth(theme.$space_scale, $i + 1);
}
}
// Margin
@for $i from 0 through 9 {
.m-#{$i} {
margin: list.nth(theme.$space_scale, $i + 1);
}
}
@for $i from 0 through 9 {
.mx-#{$i} {
margin-left: list.nth(theme.$space_scale, $i + 1);
margin-right: list.nth(theme.$space_scale, $i + 1);
}
}
.mx-auto {
margin-left: auto;
margin-right: auto;
}
@for $i from 0 through 9 {
.my-#{$i} {
margin-top: list.nth(theme.$space_scale, $i + 1);
margin-bottom: list.nth(theme.$space_scale, $i + 1);
}
}
@for $i from 0 through 9 {
.mt-#{$i} {
margin-top: list.nth(theme.$space_scale, $i + 1);
}
}
@for $i from 0 through 9 {
.mb-#{$i} {
margin-bottom: list.nth(theme.$space_scale, $i + 1);
}
}
@for $i from 0 through 9 {
.ml-#{$i} {
margin-left: list.nth(theme.$space_scale, $i + 1);
}
}
@for $i from 0 through 9 {
.mr-#{$i} {
margin-right: list.nth(theme.$space_scale, $i + 1);
}
}