-
Notifications
You must be signed in to change notification settings - Fork 13.5k
/
list.md.scss
149 lines (111 loc) · 3.46 KB
/
list.md.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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
@import "../../themes/ionic.globals.md";
// Material Design List
// --------------------------------------------------
$list-md-margin-top: 16px !default;
$list-md-margin-right: 0 !default;
$list-md-margin-bottom: 16px !default;
$list-md-margin-left: 0 !default;
$list-inset-md-margin-top: 16px !default;
$list-inset-md-margin-right: 16px !default;
$list-inset-md-margin-bottom: 16px !default;
$list-inset-md-margin-left: 16px !default;
$list-inset-md-border-radius: 2px !default;
$list-md-header-padding-left: $item-md-padding-left !default;
$list-md-header-font-size: 1.4rem !default;
$list-md-header-color: #858585 !default;
// Material Design Default List
// --------------------------------------------------
.list-md {
margin: 0 $list-md-margin-right $list-md-margin-bottom $list-md-margin-left;
}
.list-md .item-block .item-inner {
border-bottom: 1px solid $list-md-border-color;
}
.list-md > .item-block:first-child,
.list-md > .item-wrapper:first-child .item-block {
border-top: 1px solid $list-md-border-color;
}
.list-md > .item-block:last-child,
.list-md > .item-wrapper:last-child .item-block {
border-bottom: 1px solid $list-md-border-color;
}
.list-md > .item-block:last-child,
.list-md > .item-wrapper:last-child {
ion-label,
.item-inner {
border-bottom: 0;
}
}
.list-md > ion-input:last-child::after {
left: 0;
}
.list-md ion-item-options {
border-bottom: 1px solid $list-md-border-color;
}
.list-md ion-item-options .button {
display: inline-flex;
align-items: center;
margin: 1px 0;
height: calc(100% - 2px);
border: 0;
border-radius: 0;
box-shadow: none;
box-sizing: border-box;
}
.list-md ion-item-options .button::before {
margin: 0 auto;
}
// If the item has the no-lines attribute remove the bottom border from:
// the item itself (for last-child items)
// the item-inner class (if it is not last)
.list-md .item[no-lines],
.list-md .item[no-lines] .item-inner {
border-width: 0;
}
.list-md + ion-list ion-list-header {
margin-top: -$list-md-margin-top;
padding-top: 0;
}
// Material Design Inset List
// --------------------------------------------------
.list-md[inset] {
margin: $list-inset-md-margin-top $list-inset-md-margin-right $list-inset-md-margin-bottom $list-inset-md-margin-left;
border-radius: $list-inset-md-border-radius;
}
.list-md[inset] .item:first-child {
border-top-width: 0;
border-top-left-radius: $list-inset-md-border-radius;
border-top-right-radius: $list-inset-md-border-radius;
}
.list-md[inset] .item:last-child {
border-bottom-width: 0;
border-bottom-left-radius: $list-inset-md-border-radius;
border-bottom-right-radius: $list-inset-md-border-radius;
}
.list-md[inset] .item-input {
padding-right: 0;
padding-left: 0;
}
.list-md[inset] + ion-list[inset] {
margin-top: 0;
}
.list-md[inset] ion-list-header {
background-color: $list-md-background-color;
}
// Material Design No Lines List
// --------------------------------------------------
.list-md[no-lines] .item-block,
.list-md[no-lines] ion-item-options,
.list-md[no-lines] .item .item-inner {
border-width: 0;
}
// Material Design List Header / Divider
// --------------------------------------------------
.list-header-md,
.list-md ion-item-divider {
margin-left: 0;
padding-left: $list-md-header-padding-left;
border-bottom: 1px solid $list-md-border-color;
font-size: $list-md-header-font-size;
color: $list-md-header-color;
}