Skip to content

Remove default color styles for data-color-mode#3059

Merged
jonrohan merged 2 commits into
mainfrom
jonrohan-patch-2
May 18, 2026
Merged

Remove default color styles for data-color-mode#3059
jonrohan merged 2 commits into
mainfrom
jonrohan-patch-2

Conversation

@jonrohan
Copy link
Copy Markdown
Member

@jonrohan jonrohan commented May 18, 2026

ref https://github.com/github/primer/issues/6568

Removed default color mode styles for data-color-mode.

What are you trying to accomplish?

This removes the background and color properties for all data-color-mode attributes. To fix a bug where it's styling areas that are not meant to have these:

CleanShot 2026-05-18 at 11 36 50@2x

I believe this was originally added to try and support "nested themes" however this is an artifact from a different time in our engineering. We no longer support nested themes in this way.

What should reviewers focus on?

Can these changes ship as is?

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

Removed default color mode styles for data-color-mode.
Copilot AI review requested due to automatic review settings May 18, 2026 18:38
@jonrohan jonrohan requested review from a team as code owners May 18, 2026 18:38
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 18, 2026

🦋 Changeset detected

Latest commit: 1800593

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/css Minor

Not sure what this means? Click here to learn what changesets are.

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

Updated the version of '@primer/css' from patch to minor and removed default color styles for data-color-mode.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Removes the default foreground/background styling applied globally to elements with the data-color-mode attribute to prevent unintended styling bleed.

Changes:

  • Deleted the [data-color-mode] rule that set default color and background-color.
  • Added a changeset to publish the behavioral change in @primer/css.
Show a summary per file
File Description
src/base/native-colors.scss Removes global default fg/bg styling from [data-color-mode].
.changeset/small-tigers-tell.md Records the release note and version bump for the styling change.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 2

Comment thread .changeset/small-tigers-tell.md
Comment thread src/base/native-colors.scss
@jonrohan jonrohan merged commit e97b2ee into main May 18, 2026
33 checks passed
@jonrohan jonrohan deleted the jonrohan-patch-2 branch May 18, 2026 20:34
@primer primer Bot mentioned this pull request May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants