|
23 | 23 | @include border-radius($list-inset-md-border-radius);
|
24 | 24 | }
|
25 | 25 |
|
26 |
| -/** |
27 |
| - * These selectors ensure the first item in the list |
28 |
| - * has the correct radius. |
29 |
| - * We need to consider the following scenarios: |
30 |
| - 1. The first item in a list as long as it is not the only item. |
31 |
| - 2. The item in the first item-sliding in a list. |
32 |
| - * Note that we do not select "ion-item-sliding ion-item:first-of-type" |
33 |
| - * because that will cause the borders to disappear on |
34 |
| - * items in an item-sliding when the item is the first |
35 |
| - * element in the item-sliding container. |
36 |
| - */ |
37 |
| -.list-md.list-inset ion-item:not(:only-of-type):first-of-type, |
38 |
| -.list-md.list-inset ion-item-sliding:first-of-type ion-item { |
39 |
| - --border-radius: #{$list-inset-md-border-radius $list-inset-md-border-radius 0 0}; |
40 |
| -} |
41 |
| - |
42 | 26 | /**
|
43 | 27 | * These selectors ensure the last item in the list
|
44 |
| - * has the correct radius and border. |
| 28 | + * has the correct border. |
45 | 29 | * We need to consider the following scenarios:
|
46 | 30 | 1. The last item in a list as long as it is not the only item.
|
47 | 31 | 2. The item in the last item-sliding in a list.
|
|
52 | 36 | */
|
53 | 37 | .list-md.list-inset ion-item:not(:only-of-type):last-of-type,
|
54 | 38 | .list-md.list-inset ion-item-sliding:last-of-type ion-item {
|
55 |
| - --border-radius: #{0 0 $list-inset-md-border-radius $list-inset-md-border-radius}; |
56 | 39 | --border-width: 0;
|
57 | 40 | --inner-border-width: 0;
|
58 | 41 | }
|
59 | 42 |
|
60 | 43 | /**
|
61 |
| - * The only item in a list should have a border radius |
62 |
| - * on all corners. |
63 | 44 | * We target :only-child instead of :only-of-type
|
64 | 45 | * otherwise borders will disappear on items inside of
|
65 | 46 | * ion-item-sliding because the item will be the only
|
66 | 47 | * one of its type inside of the ion-item-sliding group.
|
67 | 48 | */
|
68 | 49 | .list-md.list-inset ion-item:only-child {
|
69 |
| - --border-radius: #{$list-inset-md-border-radius}; |
70 | 50 | --border-width: 0;
|
71 | 51 | --inner-border-width: 0;
|
72 | 52 | }
|
|
0 commit comments