Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(chips): removed redundant class the enable custom colors on chips
Browse files Browse the repository at this point in the history
* `.md-chip` class was redundant and it's selector was stronger than the user selector, removing this class enables the user to define a class that won't be overridden by the chip style

fixes #6965

> #breaking

Closes #7051
  • Loading branch information
EladBezalel authored and ThomasBurleson committed Mar 1, 2016
1 parent fc07353 commit 8177ee9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/chips/chips-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ md-chips.md-THEME_NAME-theme {
box-shadow: 0 2px '{{primary-color}}';
}
}
.md-chip {
md-chip {
background: '{{background-300}}';
color: '{{background-800}}';
&.md-focused {
Expand Down
6 changes: 3 additions & 3 deletions src/components/chips/chips.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $contact-chip-name-width: rem(12) !default;

.md-contact-chips {
.md-chips {
.md-chip {
md-chip {
@include rtl(padding, $contact-chip-padding, rtl-value($contact-chip-padding));
.md-contact-avatar {
@include rtl(float, left, right);
Expand Down Expand Up @@ -63,7 +63,7 @@ $contact-chip-name-width: rem(12) !default;
&:not(.md-readonly) {
cursor: text;

.md-chip:not(.md-readonly) {
md-chip:not(.md-readonly) {
@include rtl-prop(padding-right, padding-left, $chip-remove-padding-right);

._md-chip-content {
Expand All @@ -72,7 +72,7 @@ $contact-chip-name-width: rem(12) !default;
}
}

.md-chip {
md-chip {
cursor: default;
border-radius: $chip-height / 2;
display: block;
Expand Down
2 changes: 1 addition & 1 deletion src/components/chips/demoBasicUsage/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}

.custom-chips {
.md-chip {
md-chip {
position: relative;
._md-chip-remove-container {
position: absolute;
Expand Down
1 change: 0 additions & 1 deletion src/components/chips/js/chipDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ function MdChip($mdTheming, $mdUtil) {
element.append($mdUtil.processTemplate(hintTemplate));

return function postLink(scope, element, attr, ctrl) {
element.addClass('md-chip');
$mdTheming(element);

if (ctrl) angular.element(element[0].querySelector('._md-chip-content'))
Expand Down

0 comments on commit 8177ee9

Please sign in to comment.