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

Creating Header-input class for dark header inputs #1506

Merged
merged 4 commits into from
Jul 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/unlucky-cooks-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/css": minor
---

Creating `.Header-input` class for dark header inputs. This `Header-input` will be used with a `form-control` class.
4 changes: 2 additions & 2 deletions docs/content/components/header.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The `.Header` class is the wrapping class that aligns all the items properly and
</a>
</div>
<div class="Header-item">
<input type="search" class="form-control input-dark" />
<input type="search" class="form-control Header-input" />
</div>
<div class="Header-item Header-item--full">
Menu
Expand All @@ -49,7 +49,7 @@ All items directly under the `.Header` component should be a `.Header-item` comp

<!-- Form item -->
<div class="Header-item">
<input class="form-control input-dark" type="text"/>
<input class="form-control Header-input" type="text"/>
</div>

<!-- Image item -->
Expand Down
12 changes: 12 additions & 0 deletions src/header/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,15 @@
text-decoration: none;
}
}

.Header-input {
color: var(--color-header-text);
background-color: var(--color-header-search-bg);
border: $border-width $border-style var(--color-header-search-border);
Copy link
Member Author

Choose a reason for hiding this comment

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

@simurai These were the variables used in dotcom, but I think they're slated to be deprecated. Should we add to https://github.com/primer/primitives/blob/d607f36c4c974017d6974382f9bb88d6418211b8/data/colors_v2/vars/component_dark.ts#L23-L26 a border and inset variable? We could also have something for buttons maybe?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, there used to be the globalNav colors, but not sure where they were used.

I think this PR is good as is, but I guess we should move the header-search variables that are currently in "product" to "component". Now that the component supports the input.

Copy link
Contributor

Choose a reason for hiding this comment

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

Update: Moved in primer/primitives#181

box-shadow: none;

&::placeholder {
// stylelint-disable-next-line primer/colors
color: rgba(255, 255, 255, 0.75);
}
}