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

Add dark support for input field and dropdown #853

Closed
wants to merge 7 commits into from

Conversation

vdepizzol
Copy link
Contributor

@vdepizzol vdepizzol commented Jul 30, 2019

While this work is not trying to reflect on how dark theme should be supported across all primer components, it adds lightweight support for input fields and dropdowns to behave better in dark areas.

input-dark and dropdown-menu-dark are two new classes that are added on top of the existing markup to request a dark variation.

Screen Shot 2019-07-30 at 15 06 07

Screen Shot 2019-07-30 at 15 06 35

In order to create new styles to the dropdown component, I had to move the existing classes from GitHub's stylesheet.css into Primer (14237e9), since it didn't have any styles inline. To avoid duplicated code, dropdown.scss should be removed from GH's stylesheet.

This fixes https://github.com/github/design-systems/issues/669

@vercel
Copy link

vercel bot commented Jul 30, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Copy link
Member

@jonrohan jonrohan left a comment

Choose a reason for hiding this comment

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

Overall looks good. Thanks for importing this stuff. 👍

src/dropdowns/dropdown.scss Outdated Show resolved Hide resolved
@shawnbot shawnbot changed the base branch from master to release-12.6.0 August 7, 2019 22:55
jonrohan added a commit that referenced this pull request Aug 8, 2019
Copy link
Contributor

@shawnbot shawnbot left a comment

Choose a reason for hiding this comment

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

I made some suggestions to get things in line with our spacing scale. However, there are a lot of very finnicky numbers in our directional "caret" CSS, so feel free to disregard any of these suggestions that break anything. Having a Storybook view with all of the directions open at once might make it easier to work through these; lmk if I can help on that front!

@@ -0,0 +1,19 @@
# Primer dropdown
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we include the upstream changes in release-12.6.0 and regenerate this page from the template?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure what that means... should I do anything here? :)

src/dropdowns/dropdown.scss Outdated Show resolved Hide resolved
src/dropdowns/dropdown.scss Outdated Show resolved Hide resolved
src/dropdowns/dropdown.scss Outdated Show resolved Hide resolved
src/dropdowns/dropdown.scss Outdated Show resolved Hide resolved
src/dropdowns/dropdown.scss Outdated Show resolved Hide resolved
src/dropdowns/dropdown.scss Outdated Show resolved Hide resolved
src/dropdowns/dropdown.scss Outdated Show resolved Hide resolved
border-top: 7px solid $white;
border-right: 7px solid transparent;
border-bottom: 0;
border-left: 7px solid transparent;
Copy link
Contributor

Choose a reason for hiding this comment

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

src/dropdowns/dropdown.scss Outdated Show resolved Hide resolved
Co-Authored-By: Shawn Allen <shawn.allen@github.com>
@vdepizzol
Copy link
Contributor Author

Closing this for now. #862 has the same codebase but coming from a local branch.

@vdepizzol vdepizzol closed this Aug 8, 2019
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.

3 participants