Skip to content

Conversation

Copy link

Copilot AI commented Jan 29, 2026

What are you trying to accomplish?

Remove the pr- namespaced versions of margin utility classes for scale values 0, 1, and 2. Only generate .pr-m*-{scale} classes for scale ≥ 3.

What approach did you choose and why?

Added @if ($scale >= 3) conditionals before outputting .pr-* prefixed selectors in margin.scss. This affects all margin utilities:

  • .pr-m-*, .pr-mt-*, .pr-mb-*, .pr-mr-*, .pr-ml-*, .pr-mx-*, .pr-my-*
  • Negative variants: .pr-mt-n*, .pr-mb-n*, .pr-mr-n*, .pr-ml-n*

Used a combined condition @if ($scale >= 3 and $scale < length($spacer-map-rem)) for negative margin right/left to stay within stylelint's max-nesting-depth rule.

What should reviewers focus on?

  • Verify the conditional logic correctly excludes scale 0, 1, 2 while preserving scale 3+
  • Non-prefixed classes (.m-0, .mt-1, etc.) are unchanged and generated for all scales

Can these changes ship as is?

  • Yes, this PR does not depend on additional changes. 🚢
Original prompt

On margin.scss, Do not namespace for scale values 0, 1 and 2


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@changeset-bot
Copy link

changeset-bot bot commented Jan 29, 2026

⚠️ No Changeset found

Latest commit: a75a067

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI changed the title [WIP] Remove namespace for scale values 0, 1, and 2 in margin.scss Do not namespace margin utilities for scale values 0, 1, and 2 Jan 29, 2026
Copilot AI requested a review from siddharthkp January 29, 2026 10:32
@github-actions github-actions bot temporarily deployed to Storybook Preview January 29, 2026 10:41 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants