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

fix(chips): Rename stroke to outline #2635

Merged
merged 4 commits into from
Apr 23, 2018
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion demos/chips.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
@include mdc-chip-fill-color(white);
@include mdc-chip-ink-color($mdc-theme-secondary);
@include mdc-chip-selected-ink-color($mdc-theme-secondary);
@include mdc-chip-stroke(2px, solid, $mdc-theme-secondary);
@include mdc-chip-outline(2px, solid, $mdc-theme-secondary);
}
8 changes: 4 additions & 4 deletions packages/mdc-chips/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ Mixin | Description
`mdc-chip-fill-color($color)` | Customizes the background fill color for a chip
`mdc-chip-ink-color($color)` | Customizes the text ink color for a chip, and updates the chip's ripple color to match
`mdc-chip-selected-ink-color($color)` | Customizes text ink and ripple color of a chip in the _selected_ state
`mdc-chip-stroke($width, $style, $color)` | Customizes the border stroke properties for a chip
`mdc-chip-stroke-width($width)` | Customizes the border stroke width for a chip
`mdc-chip-stroke-style($style)` | Customizes the border stroke style for a chip
`mdc-chip-stroke-color($color)` | Customizes the border stroke color for a chip
`mdc-chip-outline($width, $style, $color)` | Customizes the border outline properties for a chip
Copy link
Contributor

Choose a reason for hiding this comment

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

This sounds weird saying "border outline" everywhere... And I'm not sure how I feel about saying just "outline" because that is not the CSS property this is controlling, but we should definitely pick one.

`mdc-chip-outline-width($width)` | Customizes the border outline width for a chip
`mdc-chip-outline-style($style)` | Customizes the border outline style for a chip
`mdc-chip-outline-color($color)` | Customizes the border outline color for a chip
`mdc-chip-leading-icon-color($color, $opacity)` | Customizes the color of a leading icon in a chip, optionally customizes opacity
`mdc-chip-trailing-icon-color($color, $opacity, $hover-opacity, $focus-opacity)` | Customizes the color of a trailing icon in a chip, optionally customizes regular/hover/focus opacities
`mdc-chip-leading-icon-size($size)` | Customizes the size of a leading icon in a chip
Expand Down
16 changes: 8 additions & 8 deletions packages/mdc-chips/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,22 @@
}
}

@mixin mdc-chip-stroke($width: 1, $style: solid, $color: mdc-theme-prop-value(on-surface)) {
@include mdc-chip-stroke-width($width);
@include mdc-chip-stroke-style($style);
@include mdc-chip-stroke-color($color);
@mixin mdc-chip-outline($width: 1, $style: solid, $color: mdc-theme-prop-value(on-surface)) {
@include mdc-chip-outline-width($width);
@include mdc-chip-outline-style($style);
@include mdc-chip-outline-color($color);
}

@mixin mdc-chip-stroke-color($color) {
@mixin mdc-chip-outline-color($color) {
@include mdc-theme-prop(border-color, $color);
}

@mixin mdc-chip-stroke-style($style) {
@mixin mdc-chip-outline-style($style) {
border-style: $style;
}

@mixin mdc-chip-stroke-width($width) {
// Note: Adjust padding to maintain consistent width with non-stroked chips
@mixin mdc-chip-outline-width($width) {
// Note: Adjust padding to maintain consistent width with non-outlined chips
$horizontal-padding-value: max($mdc-chip-horizontal-padding - $width, 0);
$vertical-padding-value: max($mdc-chip-vertical-padding - $width, 0);

Expand Down