-
Notifications
You must be signed in to change notification settings - Fork 13.5k
/
Copy pathitem-option.scss
128 lines (92 loc) · 2.11 KB
/
item-option.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
@import "./item-option.vars";
// Item Option
// --------------------------------------------------
:host {
/**
* @prop --background: Background of the item option
* @prop --color: Color of the item option
*/
--background: #{ion-color(primary, base)};
--color: #{ion-color(primary, contrast)};
background: var(--background);
color: var(--color);
font-family: $font-family-base;
}
:host(.in-list.item-options-end:last-child) {
@include padding-horizontal(
null, calc(.7em + var(--ion-safe-area-right))
);
}
:host(.in-list.item-options-start:first-child) {
@include padding-horizontal(
calc(.7em + var(--ion-safe-area-left)), null
);
}
:host(.ion-color) {
background: current-color(base);
color: current-color(contrast);
}
.button-native {
@include text-inherit();
@include padding(0, .7em);
display: inline-block;
position: relative;
width: 100%;
height: 100%;
border: 0;
outline: none;
background: transparent;
cursor: pointer;
appearance: none;
box-sizing: border-box;
}
.button-inner {
display: flex;
flex-flow: column nowrap;
flex-shrink: 0;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
}
.horizontal-wrapper {
display: flex;
flex-flow: row nowrap;
flex-shrink: 0;
align-items: center;
justify-content: center;
width: 100%;
}
::slotted(*) {
flex-shrink: 0;
}
::slotted([slot="start"]) {
@include margin(0, 5px, 0, 0);
}
::slotted([slot="end"]) {
@include margin(0, 0, 0, 5px);
}
::slotted([slot="icon-only"]) {
@include padding(0);
@include margin(0, 10px);
min-width: .9em;
font-size: 1.8em;
}
// Item Expandable Animation
// --------------------------------------------------
:host(.item-option-expandable) {
flex-shrink: 0;
transition-duration: 0;
transition-property: none;
transition-timing-function: cubic-bezier(.65, .05, .36, 1);
}
// Item Disabled Styling
// --------------------------------------------------
:host(.item-option-disabled) {
pointer-events: none;
}
:host(.item-option-disabled) .button-native {
cursor: default;
opacity: .5;
pointer-events: none;
}