Skip to content

Remove !important from utilities - #3145

Draft
jonrohan with Copilot wants to merge 9 commits into
mainfrom
copilot/remove-important-from-utilities
Draft

Remove !important from utilities#3145
jonrohan with Copilot wants to merge 9 commits into
mainfrom
copilot/remove-important-from-utilities

Conversation

Copilot AI commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

What are you trying to accomplish?

Remove !important from all utility styles under src/utilities/ while preserving selectors, declarations, and generated utility coverage.

What approach did you choose and why?

  • Removed !important annotations from utility SCSS declarations, including responsive and mixin-generated utilities.
  • Updated the visibility/display import-order comment to describe source-order precedence without !important.
  • Added a regression test that scans src/utilities/ for !important.
.border {
  border: $border-rem;
}

What should reviewers focus on?

  • Cascade impact from removing !important, especially utilities that previously relied on it for overrides.
  • The regression test coverage for the complete utilities tree.

Validation run:

  • rg "!important" src/utilities
  • npm run stylelint
  • npm run eslint
  • npm run dist
  • npm run build:css
  • npm test

Can these changes ship as is?

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

@changeset-bot

changeset-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3bce220

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 and others added 4 commits August 18, 2026 23:24
Co-authored-by: jonrohan <54012+jonrohan@users.noreply.github.com>
Co-authored-by: jonrohan <54012+jonrohan@users.noreply.github.com>
Co-authored-by: jonrohan <54012+jonrohan@users.noreply.github.com>
Co-authored-by: jonrohan <54012+jonrohan@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove !important from all utility styles Remove !important from utilities Aug 18, 2026
Copilot AI requested a review from jonrohan August 18, 2026 23:29
Comment thread src/utilities/visibility-display.scss Outdated
padding: 0;
overflow: hidden;
clip: rect(1px, 1px, 1px, 1px); /* stylelint-disable-line property-no-deprecated */
border: 0;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot Put all the !important back in the show-on-focus class

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Restored the !important annotations in .show-on-focus in 3bce220 and updated the regression test to allow only that exception.

Copilot AI and others added 4 commits August 18, 2026 23:37
Co-authored-by: jonrohan <54012+jonrohan@users.noreply.github.com>
Co-authored-by: jonrohan <54012+jonrohan@users.noreply.github.com>
Co-authored-by: jonrohan <54012+jonrohan@users.noreply.github.com>
Co-authored-by: jonrohan <54012+jonrohan@users.noreply.github.com>
Copilot AI requested a review from jonrohan August 18, 2026 23:42
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