Revert "Add namespaced styles to primers spacing (#2962)"#2973
Conversation
This reverts commit 5a16f92.
|
There was a problem hiding this comment.
Pull request overview
This PR reverts a previous change that added pr- namespaced utility classes for margin and padding. The decision was made to keep these namespaced styles in github/github-ui rather than in primer/css for safer migration in dotcom.
Changes:
- Removes all
pr-prefixed variants of margin utility classes (.pr-m*,.pr-mt*,.pr-mb*,.pr-mr*,.pr-ml*,.pr-mx*,.pr-my*) - Removes all
pr-prefixed variants of padding utility classes (.pr-p*,.pr-pt*,.pr-pr*,.pr-pb*,.pr-pl*,.pr-px*,.pr-py*) - Removes the associated changeset file documenting the namespace addition
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/utilities/padding.scss | Removes pr- namespaced variants of all padding utility classes, reverting to single-line formatting for most class definitions |
| src/utilities/margin.scss | Removes pr- namespaced variants of all margin utility classes (including negative margins and auto margins), reverting to single-line formatting for most class definitions |
| .changeset/empty-islands-push.md | Deletes the changeset that documented the addition of the pr- namespace for spacing utilities |
Comments suppressed due to low confidence (1)
src/utilities/margin.scss:36
- There's extra whitespace before the colon in the property declaration. The property should be
margin-left:(without the extra space) for consistency with the rest of the codebase.
.ml#{$variant}-n#{$scale} { margin-left : calc(-1 * $size) !important; }
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| .pr-m#{$variant}-#{$scale} { | ||
| margin: $size !important; | ||
| } | ||
| .m#{$variant}-#{$scale} { margin: $size !important; } |
There was a problem hiding this comment.
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).
| .m#{$variant}-#{$scale} { margin: $size !important; } | |
| .m#{$variant}-#{$scale} { margin: $size !important; } |
| margin-right: calc(-1 * $size) !important; | ||
| } | ||
|
|
||
| .mr#{$variant}-n#{$scale} { margin-right : calc(-1 * $size) !important; } |
There was a problem hiding this comment.
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.
| .mr#{$variant}-n#{$scale} { margin-right : calc(-1 * $size) !important; } | |
| .mr#{$variant}-n#{$scale} { margin-right: calc(-1 * $size) !important; } |
| .pr-p#{$variant}-#{$scale} { | ||
| padding: $size !important; | ||
| } | ||
| .p#{$variant}-#{$scale} { padding: $size !important; } |
There was a problem hiding this comment.
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).
| .p#{$variant}-#{$scale} { padding: $size !important; } | |
| .p#{$variant}-#{$scale} { padding: $size !important; } |
Uh oh!
There was an error while loading. Please reload this page.