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

Commit 8177ee9

Browse files
EladBezalelThomasBurleson
authored andcommitted
fix(chips): removed redundant class the enable custom colors on chips
* `.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
1 parent fc07353 commit 8177ee9

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

src/components/chips/chips-theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ md-chips.md-THEME_NAME-theme {
55
box-shadow: 0 2px '{{primary-color}}';
66
}
77
}
8-
.md-chip {
8+
md-chip {
99
background: '{{background-300}}';
1010
color: '{{background-800}}';
1111
&.md-focused {

src/components/chips/chips.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ $contact-chip-name-width: rem(12) !default;
1414

1515
.md-contact-chips {
1616
.md-chips {
17-
.md-chip {
17+
md-chip {
1818
@include rtl(padding, $contact-chip-padding, rtl-value($contact-chip-padding));
1919
.md-contact-avatar {
2020
@include rtl(float, left, right);
@@ -63,7 +63,7 @@ $contact-chip-name-width: rem(12) !default;
6363
&:not(.md-readonly) {
6464
cursor: text;
6565

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

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

75-
.md-chip {
75+
md-chip {
7676
cursor: default;
7777
border-radius: $chip-height / 2;
7878
display: block;

src/components/chips/demoBasicUsage/style.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
}
66

77
.custom-chips {
8-
.md-chip {
8+
md-chip {
99
position: relative;
1010
._md-chip-remove-container {
1111
position: absolute;

src/components/chips/js/chipDirective.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ function MdChip($mdTheming, $mdUtil) {
4747
element.append($mdUtil.processTemplate(hintTemplate));
4848

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

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

0 commit comments

Comments
 (0)