mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00

if you apply the no-borders attribute it will remove all borders inside of a list. Added a test case for showing this.
99 lines
2.4 KiB
SCSS
99 lines
2.4 KiB
SCSS
|
|
// iOS List
|
|
// --------------------------------------------------
|
|
|
|
$list-ios-margin-top: 10px !default;
|
|
$list-ios-margin-right: 0 !default;
|
|
$list-ios-margin-bottom: 32px !default;
|
|
$list-ios-margin-left: 0 !default;
|
|
|
|
$list-inset-ios-margin-top: 16px !default;
|
|
$list-inset-ios-margin-right: 16px !default;
|
|
$list-inset-ios-margin-bottom: 16px !default;
|
|
$list-inset-ios-margin-left: 16px !default;
|
|
$list-inset-ios-border-radius: 4px !default;
|
|
|
|
$list-ios-header-padding: 10px $item-ios-padding-right 10px $item-ios-padding-left !default;
|
|
$list-ios-header-font-size: 1.2rem !default;
|
|
$list-ios-header-font-weight: 500 !default;
|
|
$list-ios-header-letter-spacing: 0.1rem !default;
|
|
$list-ios-header-color: #333 !default;
|
|
|
|
|
|
.list {
|
|
margin: 0 $list-ios-margin-right $list-ios-margin-bottom $list-ios-margin-left;
|
|
|
|
ion-header {
|
|
position: relative;
|
|
padding: $list-ios-header-padding;
|
|
font-size: $list-ios-header-font-size;
|
|
font-weight: $list-ios-header-font-weight;
|
|
letter-spacing: $list-ios-header-letter-spacing;
|
|
text-transform: uppercase;
|
|
color: $list-ios-header-color;
|
|
|
|
&:after {
|
|
position: absolute;
|
|
z-index: 1;
|
|
right: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
border-top: 1px solid $item-ios-border-color;
|
|
content: '';
|
|
pointer-events: none;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
&.hairlines .list ion-header:after {
|
|
border-top-width: 0.55px;
|
|
}
|
|
|
|
.list + .list {
|
|
margin-top: $list-ios-margin-top + $list-ios-margin-bottom;
|
|
}
|
|
|
|
.list + .list ion-header {
|
|
margin-top: -$list-ios-margin-top;
|
|
padding-top: 0;
|
|
}
|
|
|
|
.list[inset] {
|
|
margin: $list-inset-ios-margin-top $list-inset-ios-margin-right $list-inset-ios-margin-bottom $list-inset-ios-margin-left;
|
|
border-radius: $list-inset-ios-border-radius;
|
|
|
|
.item:first-child {
|
|
margin-top: 0;
|
|
border-top-right-radius: $list-inset-ios-border-radius;
|
|
border-top-left-radius: $list-inset-ios-border-radius;
|
|
|
|
&:before {
|
|
border-top: none;
|
|
}
|
|
}
|
|
|
|
.item:last-child {
|
|
margin-bottom: 0;
|
|
border-bottom-right-radius: $list-inset-ios-border-radius;
|
|
border-bottom-left-radius: $list-inset-ios-border-radius;
|
|
|
|
&:after {
|
|
border-top: none;
|
|
}
|
|
}
|
|
}
|
|
|
|
.list[inset] + .list[inset] {
|
|
margin-top: 0;
|
|
}
|
|
|
|
&.hairlines .list[no-borders],
|
|
.list[no-borders] {
|
|
ion-header:after,
|
|
.item:before,
|
|
.item:after {
|
|
border-width: 0;
|
|
}
|
|
}
|