Skip to content

Commit 33f171e

Browse files
authored
bug(uui-select): Use css vars for background and text color (#827)
1 parent 5b2d81b commit 33f171e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/uui-select/lib/uui-select.element.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ declare global {
2323
* @fires change - when the user changes value
2424
* @cssprop --uui-select-height - Height of the element
2525
* @cssprop --uui-select-font-size - Font size of the element
26+
* @cssprop --uui-select-text-color - Color of the text
2627
* @cssprop --uui-select-padding-y - Padding on the y axis
2728
* @cssprop --uui-select-padding-x - Padding on the x axis
2829
* @cssprop --uui-select-border-color - Border color
2930
* @cssprop --uui-select-border-color-hover - Border color on hover
3031
* @cssprop --uui-select-selected-option-background-color - Background color of the selected option
3132
* @cssprop --uui-select-selected-option-color - Color of the selected option
3233
* @cssprop --uui-select-outline-color - Outline color
34+
* @cssprop --uui-select-background-color - Background color
3335
* @cssprop --uui-select-disabled-background-color - Background color when disabled
3436
* @extends UUIFormControlMixin
3537
*/
@@ -282,13 +284,17 @@ export class UUISelectElement extends UUIFormControlMixin(LitElement, '') {
282284
height: var(--uui-select-height, var(--uui-size-11));
283285
padding: var(--uui-select-padding-y, var(--uui-size-1))
284286
var(--uui-select-padding-x, var(--uui-size-2));
285-
color: currentColor;
287+
color: var(--uui-select-text-color, var(--uui-color-text));
286288
box-sizing: border-box;
287289
border-radius: 0;
288290
border: 1px solid
289291
var(--uui-select-border-color, var(--uui-color-border));
290292
transition: all 150ms ease;
291293
width: 100%;
294+
background-color: var(
295+
--uui-select-background-color,
296+
var(--uui-color-surface)
297+
);
292298
}
293299
294300
#native:focus {

0 commit comments

Comments
 (0)