-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathlist-item.scss
76 lines (61 loc) · 1.52 KB
/
list-item.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
@import "../style/base";
@import "list-item-vars";
:host {
--_list-item-color: #{$list-item-color};
--_list-item-bg: #{$list-item-bg};
color: var(--_list-item-color);
background: var(--_list-item-bg);
border-radius: $list-item-border-radius;
transition: $list-item-transition;
padding: $list-item-padding;
display: flex;
align-items: center;
outline: none;
overflow: hidden;
position: relative;
text-align: left;
}
:host([clickable]) {
user-select: none;
}
:host([clickable]:not([active]):not([disabled])) {
cursor: pointer;
}
:host(:hover), :host(:focus) {
--_list-item-color: #{$list-item-color-hover};
--_list-item-bg: #{$list-item-bg-hover};
will-change: background, color;
}
:host([active]:focus), :host([active]:hover) {
--_list-item-color: #{$list-item-color-active-hover};
--_list-item-bg: #{$list-item-bg-active-hover};
}
:host([disabled]) {
--_list-item-color: #{$list-item-color-disabled};
--_list-item-bg: #{$list-item-bg-disabled};
opacity: $list-item-opacity-disabled;
pointer-events: none;
}
:host([active]) {
--_list-item-color: #{$list-item-color-active};
--_list-item-bg: #{$list-item-bg-active};
}
::slotted([slot="before"]), ::slotted([slot="after"]) {
flex-shrink: 0;
}
::slotted([slot="before"]) {
align-self: $list-item-before-align-self;
margin: $list-item-before-margin;
}
::slotted([slot="after"]) {
align-self: $list-item-after-align-self;
margin: $list-item-after-margin;
}
#content {
flex-grow: 1;
display: flex;
flex-direction: column;
}
#ripple {
pointer-events: none;
}