7
7
/* *
8
8
* @prop --background: Background of the item
9
9
* @prop --background-activated: Background of the item when pressed
10
+ * @prop --background-focused: Background of the item when focused with the tab key
11
+ * @prop --background-hover: Background of the item on hover
10
12
*
11
13
* @prop --border-color: Color of the item border
12
14
* @prop --border-radius: Radius of the item border
16
18
* @prop --box-shadow: Box shadow of the item
17
19
*
18
20
* @prop --color: Color of the item
21
+ * @prop --color-activated: Color of the item when pressed
22
+ * @prop --color-focused: Color of the item when focused with the tab key
23
+ * @prop --color-hover: Color of the item on hover
19
24
*
20
25
* @prop --detail-icon-color: Color of the item detail icon
21
26
* @prop --detail-icon-opacity: Opacity of the item detail icon
63
68
--detail-icon-color : initial ;
64
69
--detail-icon-font-size : 20px ;
65
70
--detail-icon-opacity : 0.25 ;
71
+ --color-activated : var (--color );
72
+ --color-focused : var (--color );
73
+ --color-hover : var (--color );
66
74
--ripple-color : var (--ion-item-background-activated , currentColor );
67
75
68
76
@include font-smoothing ();
85
93
}
86
94
87
95
88
- // Item with Color
96
+ // Item: Color
89
97
// --------------------------------------------------
90
98
91
99
:host (.ion-color ) .item-native {
99
107
}
100
108
101
109
102
- // Activated Item
110
+ // Item: Focused
103
111
// --------------------------------------------------
104
112
105
113
:host (.ion-focused ) .item-native {
106
114
background : var (--background-focused );
115
+ color : var (--color-focused );
107
116
}
108
117
109
- :host (.activated ) .item-native {
110
- background : var (--background-activated );
118
+ :host (.ion-color.ion-focused ) .item-native {
119
+ background : current-color (shade );
120
+ color : current-color (contrast );
111
121
}
112
122
113
- :host (.ion-color.activated ) .item-native {
114
- background : current-color (tint );
123
+
124
+ // Item: Hover
125
+ // --------------------------------------------------
126
+
127
+ @media (any-hover : hover) {
128
+ :host (.ion-activatable :hover ) .item-native {
129
+ background : var (--background-hover );
130
+ color : var (--color-hover );
131
+ }
132
+
133
+ :host (.ion-color.ion-activatable :hover ) .item-native {
134
+ background : #{current-color (tint )} ;
135
+ color : #{current-color (contrast )} ;
136
+ }
115
137
}
116
138
117
139
118
- // Disabled Item
140
+ // Item: Activated
119
141
// --------------------------------------------------
120
142
143
+ :host (.activated ) .item-native {
144
+ background : var (--background-activated );
145
+ color : var (--color-activated );
146
+ }
147
+
148
+
149
+ // Item: Disabled
150
+ // --------------------------------------------------
151
+
152
+ :host (.item-interactive-disabled ) {
153
+ cursor : default ;
154
+ pointer-events : none ;
155
+ }
156
+
121
157
:host (.item-disabled ) {
122
158
cursor : default ;
123
159
opacity : .3 ;
@@ -209,7 +245,7 @@ button, a {
209
245
}
210
246
211
247
// Item Detail Icon
212
- // -----------------------------------------
248
+ // --------------------------------------------------
213
249
214
250
.item-detail-icon {
215
251
color : var (--detail-icon-color );
@@ -221,7 +257,7 @@ button, a {
221
257
222
258
223
259
// Item Slots
224
- // -----------------------------------------
260
+ // --------------------------------------------------
225
261
226
262
::slotted(ion-icon) {
227
263
font-size : 1.6em ;
@@ -242,7 +278,7 @@ button, a {
242
278
243
279
244
280
// Item Input
245
- // -----------------------------------------
281
+ // --------------------------------------------------
246
282
247
283
:host ([vertical-align-top ]),
248
284
:host (.item-input ) {
@@ -331,7 +367,7 @@ button, a {
331
367
332
368
333
369
// Item Select
334
- // -----------------------------------------
370
+ // --------------------------------------------------
335
371
336
372
:host (.item-label-stacked ) ::slotted(ion-select),
337
373
:host (.item-label-floating ) ::slotted(ion-select) {
@@ -346,7 +382,7 @@ button, a {
346
382
347
383
348
384
// Item Datetime
349
- // -----------------------------------------
385
+ // --------------------------------------------------
350
386
351
387
:host (.item-label-stacked ) ::slotted(ion-datetime),
352
388
:host (.item-label-floating ) ::slotted(ion-datetime) {
@@ -357,9 +393,9 @@ button, a {
357
393
358
394
359
395
// Item w/ Multiple Inputs
360
- // -----------------------------------------
361
- // Multiple inputs in an item should have the input cover
362
- // relative to them instead of the item
396
+ // --------------------------------------------------
397
+ // Multiple inputs in an item should have the input
398
+ // cover relative to themselves instead of the item
363
399
364
400
:host (.item-multiple-inputs ) ::slotted(ion-datetime),
365
401
:host (.item-multiple-inputs ) ::slotted(ion-select) {
@@ -368,7 +404,7 @@ button, a {
368
404
369
405
370
406
// Item Textarea
371
- // -----------------------------------------
407
+ // --------------------------------------------------
372
408
373
409
:host (.item-textarea ) {
374
410
align-items : stretch ;
0 commit comments