Skip to content

Commit be7add8

Browse files
authored
fix: update mgt-taxonomy-picker colors to match mgt-picker (#2747)
1 parent c9023c2 commit be7add8

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

packages/mgt-components/src/components/mgt-taxonomy-picker/mgt-taxonomy-picker.scss

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,25 @@
1010
@import './mgt-taxonomy-picker.theme';
1111

1212
:host {
13-
--max-height: var(--taxonomy-picker-max-height, 380px);
13+
--max-height: var(--taxonomy-picker-list-max-height, 380px);
1414

1515
.picker {
1616
background-color: $taxonomy-picker-background-color;
1717
}
18+
19+
fluent-combobox {
20+
&::part(selected-value) {
21+
&::placeholder {
22+
color: $taxonomy-picker-placeholder-color;
23+
}
24+
25+
&:hover {
26+
&::placeholder {
27+
color: $taxonomy-picker-placeholder-hover-color;
28+
}
29+
}
30+
}
31+
}
1832
}
1933

2034
[dir='rtl'] {

packages/mgt-components/src/components/mgt-taxonomy-picker/mgt-taxonomy-picker.theme.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@
88
@import '../../styles/shared-sass-variables';
99

1010
$taxonomy-picker-background-color: var(--taxonomy-picker-background-color, transparent);
11+
$taxonomy-picker-placeholder-color: var(--taxonomy-picker-placeholder-color, var(--input-filled-placeholder-rest));
12+
$taxonomy-picker-placeholder-hover-color: var(
13+
--taxonomy-picker-placeholder-color-hover,
14+
var(--secondary-text-hover-color)
15+
);

packages/mgt-components/src/components/mgt-taxonomy-picker/mgt-taxonomy-picker.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ registerFluentComponents(fluentCombobox, fluentOption);
3333
*
3434
* @cssprop --taxonomy-picker-background-color - {Color} Picker component background color
3535
* @cssprop --taxonomy-picker-list-max-height - {String} max height for options list. Default value is 380px.
36+
* @cssprop --taxonomy-picker-placeholder-color - {Color} Text color for the placeholder in the picker
37+
* @cssprop --taxonomy-picker-placeholder-hover-color - {Color} Text color for the placeholder in the picker on hover
3638
*/
3739
@customElement('taxonomy-picker')
3840
export class MgtTaxonomyPicker extends MgtTemplatedComponent {

0 commit comments

Comments
 (0)