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
6 changes: 0 additions & 6 deletions .changeset/empty-islands-push.md

This file was deleted.

78 changes: 16 additions & 62 deletions src/utilities/margin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,78 +8,45 @@
@each $scale, $size in $spacer-map-rem-extended {
@if ($scale < length($spacer-map-rem)) {
/* Set a $size margin to all sides at $breakpoint */
.m#{$variant}-#{$scale},
.pr-m#{$variant}-#{$scale} {
margin: $size !important;
}
.m#{$variant}-#{$scale} { margin: $size !important; }
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two spaces between the selector and the opening brace. This should be a single space for consistency with the rest of the codebase (see other lines in this file and src/utilities/borders.scss which use single spaces).

Suggested change
.m#{$variant}-#{$scale} { margin: $size !important; }
.m#{$variant}-#{$scale} { margin: $size !important; }

Copilot uses AI. Check for mistakes.
}

/* Set a $size margin on the top at $breakpoint */
.mt#{$variant}-#{$scale},
.pr-mt#{$variant}-#{$scale} {
margin-top: $size !important;
}

.mt#{$variant}-#{$scale} { margin-top: $size !important; }
/* Set a $size margin on the bottom at $breakpoint */
.mb#{$variant}-#{$scale},
.pr-mb#{$variant}-#{$scale} {
margin-bottom: $size !important;
}
.mb#{$variant}-#{$scale} { margin-bottom: $size !important; }

@if ($scale < length($spacer-map-rem)) {
/* Set a $size margin on the right at $breakpoint */
.mr#{$variant}-#{$scale},
.pr-mr#{$variant}-#{$scale} {
margin-right: $size !important;
}

.mr#{$variant}-#{$scale} { margin-right: $size !important; }
/* Set a $size margin on the left at $breakpoint */
.ml#{$variant}-#{$scale},
.pr-ml#{$variant}-#{$scale} {
margin-left: $size !important;
}
.ml#{$variant}-#{$scale} { margin-left: $size !important; }
}

@if ($size != 0) {
/* Set a negative $size margin on top at $breakpoint */
.mt#{$variant}-n#{$scale},
.pr-mt#{$variant}-n#{$scale} {
margin-top: calc(-1 * $size) !important;
}

.mt#{$variant}-n#{$scale} { margin-top: calc(-1 * $size) !important; }
/* Set a negative $size margin on the bottom at $breakpoint */
.mb#{$variant}-n#{$scale},
.pr-mb#{$variant}-n#{$scale} {
margin-bottom: calc(-1 * $size) !important;
}
.mb#{$variant}-n#{$scale} { margin-bottom: calc(-1 * $size) !important; }

@if ($scale < length($spacer-map-rem)) {
/* Set a negative $size margin on the right at $breakpoint */
.mr#{$variant}-n#{$scale},
.pr-mr#{$variant}-n#{$scale} {
margin-right: calc(-1 * $size) !important;
}

.mr#{$variant}-n#{$scale} { margin-right : calc(-1 * $size) !important; }
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's extra whitespace before the colon in the property declaration. The property should be margin-right: (without the extra space) for consistency with the rest of the codebase.

Suggested change
.mr#{$variant}-n#{$scale} { margin-right : calc(-1 * $size) !important; }
.mr#{$variant}-n#{$scale} { margin-right: calc(-1 * $size) !important; }

Copilot uses AI. Check for mistakes.
/* Set a negative $size margin on the left at $breakpoint */
.ml#{$variant}-n#{$scale},
.pr-ml#{$variant}-n#{$scale} {
margin-left: calc(-1 * $size) !important;
}
.ml#{$variant}-n#{$scale} { margin-left : calc(-1 * $size) !important; }
}
}

@if ($scale < length($spacer-map-rem)) {
/* Set a $size margin on the left & right at $breakpoint */
.mx#{$variant}-#{$scale},
.pr-mx#{$variant}-#{$scale} {
.mx#{$variant}-#{$scale} {
margin-right: $size !important;
margin-left: $size !important;
}
}

/* Set a $size margin on the top & bottom at $breakpoint */
.my#{$variant}-#{$scale},
.pr-my#{$variant}-#{$scale} {
.my#{$variant}-#{$scale} {
margin-top: $size !important;
margin-bottom: $size !important;
}
Expand All @@ -93,22 +60,9 @@
}
}

.m-auto {
margin: auto !important;
}

.mt-auto {
margin-top: auto !important;
}
.m-auto { margin: auto !important; }

.mr-auto {
margin-right: auto !important;
}

.mb-auto {
margin-bottom: auto !important;
}

.ml-auto {
margin-left: auto !important;
}
.mt-auto { margin-top: auto !important; }
.mr-auto { margin-right: auto !important; }
.mb-auto { margin-bottom: auto !important; }
.ml-auto { margin-left: auto !important; }
34 changes: 7 additions & 27 deletions src/utilities/padding.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,48 +8,28 @@
@each $scale, $size in $spacer-map-rem-extended {
@if ($scale < length($spacer-map-rem)) {
/* Set a $size padding to all sides at $breakpoint */
.p#{$variant}-#{$scale},
.pr-p#{$variant}-#{$scale} {
padding: $size !important;
}
.p#{$variant}-#{$scale} { padding: $size !important; }
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two spaces between the selector and the opening brace. This should be a single space for consistency with the rest of the codebase (see other lines in this file and src/utilities/borders.scss which use single spaces).

Suggested change
.p#{$variant}-#{$scale} { padding: $size !important; }
.p#{$variant}-#{$scale} { padding: $size !important; }

Copilot uses AI. Check for mistakes.
}

/* Set a $size padding to the top at $breakpoint */
.pt#{$variant}-#{$scale},
.pr-pt#{$variant}-#{$scale} {
padding-top: $size !important;
}

.pt#{$variant}-#{$scale} { padding-top: $size !important; }
/* Set a $size padding to the right at $breakpoint */
.pr#{$variant}-#{$scale},
.pr-pr#{$variant}-#{$scale} {
padding-right: $size !important;
}

.pr#{$variant}-#{$scale} { padding-right: $size !important; }
/* Set a $size padding to the bottom at $breakpoint */
.pb#{$variant}-#{$scale},
.pr-pb#{$variant}-#{$scale} {
padding-bottom: $size !important;
}

.pb#{$variant}-#{$scale} { padding-bottom: $size !important; }
/* Set a $size padding to the left at $breakpoint */
.pl#{$variant}-#{$scale},
.pr-pl#{$variant}-#{$scale} {
padding-left: $size !important;
}
.pl#{$variant}-#{$scale} { padding-left: $size !important; }

@if ($scale < length($spacer-map-rem)) {
/* Set a $size padding to the left & right at $breakpoint */
.px#{$variant}-#{$scale},
.pr-px#{$variant}-#{$scale} {
.px#{$variant}-#{$scale} {
padding-right: $size !important;
padding-left: $size !important;
}
}

/* Set a $size padding to the top & bottom at $breakpoint */
.py#{$variant}-#{$scale},
.pr-py#{$variant}-#{$scale} {
.py#{$variant}-#{$scale} {
padding-top: $size !important;
padding-bottom: $size !important;
}
Expand Down
Loading