-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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 chips keyboard support. #2046
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,10 @@ | ||
.chips-demo { | ||
.md-chip-list-stacked { | ||
display: block; | ||
max-width: 200px; | ||
} | ||
|
||
md-basic-chip { | ||
margin: auto 10px; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,12 @@ | |
} | ||
|
||
.md-chip.selected { | ||
// There is no dark theme in the current spec, so this applies to both | ||
background-color: #808080; | ||
|
||
// Use a contrast color for a grey very close to the background color | ||
color: md-contrast($md-grey, 600); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's fine to use a different color so long as it's handled for both light and dark theme. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can use a custom background color, but is there a good way to do the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The contrast colors aren't calculated, it's just whatever a human designer thought looked "right". Where in the spec does it say There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess it's never "stated" in the spec; I just used a color picker and pulled it from the spec images (which all appear to be consistent). |
||
|
||
&.md-primary { | ||
background-color: md-color($primary, 500); | ||
color: md-contrast($primary, 500); | ||
|
@@ -26,4 +32,4 @@ | |
color: md-contrast($warn, 500); | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add comment explaining that this is the same color in both light and dark themes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can definitely do that; but do we have any specs for a dark theme? I think it would be nice to change it as the current chips in dark mode do look a bit out of place.