forked from carbon-design-system/carbon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_combo-box.scss
79 lines (67 loc) · 2.25 KB
/
_combo-box.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//
// Copyright IBM Corp. 2016, 2023
//
// This source code is licensed under the Apache-2.0 license found in the
// LICENSE file in the root directory of this source tree.
//
@use '../list-box';
@use '../../config' as *;
@use '../../theme' as *;
@use '../../utilities/convert';
@use '../../utilities/focus-outline' as *;
/// Combo box styles
/// @access public
/// @group combo-box
@mixin combo-box {
.#{$prefix}--combo-box:hover {
background-color: $field;
}
// V11: Possibly deprecate
.#{$prefix}--combo-box.#{$prefix}--list-box--light:hover {
background-color: $field-02;
}
.#{$prefix}--combo-box .#{$prefix}--text-input::-ms-clear {
display: none;
}
.#{$prefix}--combo-box.#{$prefix}--list-box--expanded
.#{$prefix}--text-input {
border-block-end-color: $border-subtle;
}
.#{$prefix}--combo-box--input--focus.#{$prefix}--text-input {
@include focus-outline('outline');
}
.#{$prefix}--combo-box.#{$prefix}--list-box--expanded:has(
input[aria-activedescendant]:not([aria-activedescendant=''])
)
.#{$prefix}--combo-box--input--focus.#{$prefix}--text-input {
outline-offset: convert.to-rem(-1px);
outline-width: convert.to-rem(1px);
}
.#{$prefix}--combo-box .#{$prefix}--list-box__field,
.#{$prefix}--combo-box.#{$prefix}--list-box[data-invalid]
.#{$prefix}--list-box__field,
.#{$prefix}--combo-box.#{$prefix}--list-box--warning
.#{$prefix}--list-box__field,
.#{$prefix}--combo-box.#{$prefix}--list-box--disabled.#{$prefix}--list-box[data-invalid]
.#{$prefix}--list-box__field,
.#{$prefix}--combo-box.#{$prefix}--list-box--disabled.#{$prefix}--list-box--warning
.#{$prefix}--list-box__field {
padding: 0;
}
// readonly
.#{$prefix}--combo-box--readonly,
.#{$prefix}--combo-box--readonly:hover {
background-color: transparent;
}
.#{$prefix}--combo-box--readonly .#{$prefix}--text-input {
border-block-end-color: $border-subtle;
}
.#{$prefix}--combo-box--readonly .#{$prefix}--list-box__menu-icon,
.#{$prefix}--combo-box--readonly .#{$prefix}--list-box__selection {
cursor: default;
}
.#{$prefix}--combo-box--readonly .#{$prefix}--list-box__menu-icon svg,
.#{$prefix}--combo-box--readonly .#{$prefix}--list-box__selection svg {
fill: $icon-disabled;
}
}