Skip to content

Set FormControl color#2268

Merged
simurai merged 2 commits into
mainfrom
form-control-color
Sep 30, 2022
Merged

Set FormControl color#2268
simurai merged 2 commits into
mainfrom
form-control-color

Conversation

@simurai

@simurai simurai commented Sep 29, 2022

Copy link
Copy Markdown
Contributor

What are you trying to accomplish?

This came up in https://github.com/github/primer/discussions/1313#discussioncomment-3748057. It seems that form controls don't inherit the color and use the browser default which is #000000. This PR overrides the browser default with --color-fg-default.

What approach did you choose and why?

@mixin Field {
  color: var(--color-fg-default);

What should reviewers focus on?

Instead of adding the color to the Field mixin, we could also add it to:

.FormControl-input,
.FormControl-select,
.FormControl-textarea {

But I thought might be good to keep fg and bg color in the same place.

Can these changes ship as is?

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

@changeset-bot

changeset-bot Bot commented Sep 29, 2022

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 145de7e

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 September 29, 2022 02:44 Inactive
@github-actions github-actions Bot temporarily deployed to Storybook Preview September 29, 2022 02:45 Inactive
@simurai simurai marked this pull request as ready for review September 29, 2022 03:11
@simurai simurai requested a review from a team as a code owner September 29, 2022 03:11
@simurai simurai requested a review from langermank September 29, 2022 03:11
@simurai simurai merged commit 2e2bc71 into main Sep 30, 2022
@simurai simurai deleted the form-control-color branch September 30, 2022 00:22
@primer-css primer-css mentioned this pull request Sep 30, 2022
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.

2 participants