Skip to content

Commit 3336859

Browse files
committed
feat(item-divider): cleanup
1 parent 77e50df commit 3336859

File tree

6 files changed

+23
-5
lines changed

6 files changed

+23
-5
lines changed

core/src/components/item-divider/item-divider.interfaces.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export type IonItemDividerRecipe = {
44
background?: string;
55
color?: string;
66
minHeight?: string;
7-
zIndex?: number;
87

98
padding?: IonPadding;
109

@@ -22,16 +21,19 @@ export type IonItemDividerRecipe = {
2221
};
2322

2423
leading?: {
24+
// Targets `:host([slot="start"])`
2525
anchor?: {
2626
margin?: IonMargin;
2727
};
2828

29+
// Targets `::slotted([slot="start"])`
2930
edge?: {
3031
margin?: IonMargin;
3132
};
3233
};
3334

3435
trailing?: {
36+
// Targets `::slotted([slot="end"])`
3537
edge?: {
3638
margin?: IonMargin;
3739
};
@@ -47,12 +49,14 @@ export type IonItemDividerRecipe = {
4749
};
4850

4951
leading?: {
52+
// Targets `::slotted([slot="start"])`
5053
edge?: {
5154
margin?: IonMargin;
5255
};
5356
};
5457

5558
trailing?: {
59+
// Targets `::slotted([slot="end"])`
5660
edge?: {
5761
margin?: IonMargin;
5862
};
@@ -89,12 +93,14 @@ export type IonItemDividerRecipe = {
8993
margin?: IonMargin;
9094

9195
leading?: {
96+
// Targets `::slotted([slot="start"])`
9297
edge?: {
9398
margin?: IonMargin;
9499
};
95100
};
96101

97102
trailing?: {
103+
// Targets `::slotted([slot="end"])`
98104
edge?: {
99105
margin?: IonMargin;
100106
};
@@ -108,12 +114,14 @@ export type IonItemDividerRecipe = {
108114
margin?: IonMargin;
109115

110116
leading?: {
117+
// Targets `::slotted([slot="start"])`
111118
edge?: {
112119
margin?: IonMargin;
113120
};
114121
};
115122

116123
trailing?: {
124+
// Targets `::slotted([slot="end"])`
117125
edge?: {
118126
margin?: IonMargin;
119127
};
@@ -127,6 +135,7 @@ export type IonItemDividerRecipe = {
127135
header2?: {
128136
margin?: IonMargin;
129137

138+
// Targets `:last-child`
130139
trailing?: {
131140
margin?: IonMargin;
132141
};
@@ -135,6 +144,7 @@ export type IonItemDividerRecipe = {
135144
header3?: {
136145
margin?: IonMargin;
137146

147+
// Targets `:last-child`
138148
trailing?: {
139149
margin?: IonMargin;
140150
};
@@ -143,6 +153,7 @@ export type IonItemDividerRecipe = {
143153
header4?: {
144154
margin?: IonMargin;
145155

156+
// Targets `:last-child`
146157
trailing?: {
147158
margin?: IonMargin;
148159
};
@@ -151,6 +162,7 @@ export type IonItemDividerRecipe = {
151162
header5?: {
152163
margin?: IonMargin;
153164

165+
// Targets `:last-child`
154166
trailing?: {
155167
margin?: IonMargin;
156168
};
@@ -159,6 +171,7 @@ export type IonItemDividerRecipe = {
159171
header6?: {
160172
margin?: IonMargin;
161173

174+
// Targets `:last-child`
162175
trailing?: {
163176
margin?: IonMargin;
164177
};
@@ -178,6 +191,7 @@ export type IonItemDividerRecipe = {
178191
overflow?: string;
179192
};
180193

194+
// Targets `:last-child`
181195
trailing?: {
182196
margin?: IonMargin;
183197
};

core/src/components/item-divider/item-divider.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@
6969

7070
overflow: hidden;
7171

72-
z-index: var(--ion-item-divider-z-index, auto);
72+
//
73+
z-index: 100;
7374
box-sizing: border-box;
7475
}
7576

core/src/themes/ionic/default.tokens.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,6 @@ export const defaultTheme: DefaultTheme = {
268268
background: baseColors.backgroundColor,
269269
color: `var(--ion-text-color-step-600, ${mix(baseColors.white, baseColors.black, '40%')})`,
270270
minHeight: 'var(--ion-scaling-750)',
271-
zIndex: 100,
272271

273272
padding: {
274273
top: 'var(--ion-spacing-0)',

core/src/themes/ios/default.tokens.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,12 +408,18 @@ export const defaultTheme: DefaultTheme = {
408408
minHeight: 'var(--ion-scaling-sm)',
409409

410410
padding: {
411+
top: 'var(--ion-spacing-0)',
412+
end: 'var(--ion-spacing-0)',
413+
bottom: 'var(--ion-spacing-0)',
411414
start: components.item.padding.start,
412415
},
413416

414417
inner: {
415418
padding: {
419+
top: 'var(--ion-spacing-0)',
416420
end: `calc(${components.item.padding.end} * 0.5)`,
421+
bottom: 'var(--ion-spacing-0)',
422+
start: 'var(--ion-spacing-0)',
417423
},
418424
},
419425

core/src/themes/md/default.tokens.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,6 @@ export const defaultTheme: DefaultTheme = {
401401
background: baseColors.backgroundColor,
402402
color: `var(--ion-text-color-step-600, ${mix(baseColors.white, baseColors.black, '40%')})`,
403403
minHeight: 'var(--ion-scaling-750)',
404-
zIndex: 100,
405404

406405
padding: {
407406
top: 'var(--ion-spacing-0)',

core/src/themes/native/native.globals.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,5 @@ $z-index-overlay-wrapper: 10;
6363

6464
$z-index-item-options: 1;
6565
$z-index-item-input: 2;
66-
$z-index-item-divider: 100;
6766

6867
$z-index-reorder-selected: 100;

0 commit comments

Comments
 (0)