Skip to content
This repository was archived by the owner on May 20, 2023. It is now read-only.

Commit f88a02e

Browse files
Googlernshahan
authored andcommitted
Add a mixin to material-chips to allow additional styling
PiperOrigin-RevId: 216931615
1 parent dfce342 commit f88a02e

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

angular_components/lib/material_chips/_mixins.scss

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,20 @@ $left-icon-width: $mat-grid * 4;
8888
}
8989
}
9090

91+
/// Use this mixin to add a border to each of the chips.
92+
@mixin material-chip-border($border) {
93+
::ng-deep material-chip {
94+
border: $border;
95+
}
96+
}
97+
98+
/// Use this mixin to change the font size of each of the chips.
99+
@mixin material-chip-font-size($size) {
100+
::ng-deep material-chip {
101+
font-size: $size;
102+
}
103+
}
104+
91105
$main-hover-bg-color: $mat-gray-400;
92106
$main-selected-bg-color: $mat-gray-600;
93107

@@ -101,6 +115,27 @@ $emphasis-selected-bg-color: $mat-blue-900;
101115
}
102116
}
103117

118+
/// Use this mixin to change the background color of the chips container.
119+
@mixin material-chips-background-color($color) {
120+
::ng-deep material-chips {
121+
background-color: $color;
122+
}
123+
}
124+
125+
/// Use this mixin to add a bottom border to the chips container.
126+
@mixin material-chips-border-bottom($border-bottom) {
127+
::ng-deep material-chips {
128+
border-bottom: $border-bottom;
129+
}
130+
}
131+
132+
/// Use this mixin to change the padding of the chips container.
133+
@mixin material-chips-padding($padding) {
134+
::ng-deep material-chips {
135+
padding: $padding;
136+
}
137+
}
138+
104139
/// Use this mixin when chips are clickable for cursor, hover, and focus
105140
/// styling.
106141
///

0 commit comments

Comments
 (0)