-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Revert "Add namespaced styles to primers spacing (#2962)" #2973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This reverts commit 5a16f92.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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; } |
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
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).
| .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; } |
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
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.
| .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; } |
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
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).
| .p#{$variant}-#{$scale} { padding: $size !important; } | |
| .p#{$variant}-#{$scale} { padding: $size !important; } |
Uh oh!
There was an error while loading. Please reload this page.