Skip to content
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

Revert "Add ::selection to root color vars" #2468

Merged
merged 2 commits into from
Jun 22, 2023

Conversation

keithamus
Copy link
Member

Reverts #2437

@langermank This PR will need reverting because the introduction of ::selection blows the whole selector away. The ::selection style needs to be standalone it seems. In particular, the following:

@include color-mode("light") {
  p {
    color: green
  }
}

gets compiled into

:root p,
::selection p {
  color: green
}

which it seems is discarded. Here's a minimal repro to demonstrate that the selector is discarded:

https://codepen.io/keithamus/pen/mdQrGMo

Refs https://github.com/github/issues/issues/6741, https://github.com/orgs/community/discussions/58723#discussioncomment-6250327

@keithamus keithamus requested a review from a team as a code owner June 22, 2023 09:58
@changeset-bot
Copy link

changeset-bot bot commented Jun 22, 2023

🦋 Changeset detected

Latest commit: a91aed7

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 Patch

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

@github-actions github-actions bot temporarily deployed to Storybook Preview June 22, 2023 10:04 Inactive
@github-actions github-actions bot temporarily deployed to Storybook Preview June 22, 2023 10:08 Inactive
@keithamus keithamus merged commit c6d5d1d into main Jun 22, 2023
@keithamus keithamus deleted the revert-2437-selection-root-fix branch June 22, 2023 10:26
@primer-css primer-css mentioned this pull request Jun 22, 2023
langermank added a commit that referenced this pull request Jun 22, 2023
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