Files
ionic-framework/scss/ionic/_listview.scss
2013-10-16 11:22:01 -05:00

267 lines
5.2 KiB
SCSS

.list {
// No need to set list-style: none; since .list-item is block level
margin-bottom: 20px;
padding-left: 0; // reset padding because ul and ol
position: relative;
@include list-style($list-default-background, $list-default-border, $gray-dark);
&.list-success {
@include list-style($list-success-background, $list-success-border, $white);
}
}
/**
* An individual list item.
*/
.list-item {
position: relative;
display: block;
// Place the border on the list items and negative margin up for better styling
margin-bottom: -1px;
// Make sure the borders and stuff don't get hidden
// by children
z-index: 2;
background-color: $list-default-background;
border: $list-item-border;
// Round the first and last items
&:first-child {
//@include border-top-radius($list-group-border-radius);
}
&:last-child {
margin-bottom: 0;
//@include border-bottom-radius($list-group-border-radius);
}
// Align badges within list items
> .badge {
float: right;
}
// Align icons to the right
> i:last-child {
float: right;
}
> .badge + .badge {
margin-right: 5px;
}
// [converter] extracted a& to a.list-item
// Active class on item itself, not parent
&.active,
&.active:hover,
&.active:focus {
z-index: 2;
//color: $list-group-active-color;
//background-color: $list-group-active-bg;
//border-color: $list-group-active-border;
// Force color to inherit for custom content
.list-item-heading {
color: inherit;
}
.list-item-text {
//color: lighten($list-group-active-bg, 40%);
}
}
// Different themes for list items
&.list-item-default { @include list-item-style-active($brand-default, $gray-dark, $gray-dark); }
&.list-item-secondary { @include list-item-style-active($brand-default, $gray-dark, $gray-dark); }
&.list-item-primary { @include list-item-style-active($brand-primary, $gray-dark, $white); }
&.list-item-info { @include list-item-style-active($brand-info, $gray-dark, $white); }
&.list-item-success { @include list-item-style-active($brand-success, $gray-dark, $white); }
&.list-item-warning { @include list-item-style-active($brand-warning, $gray-dark, $white); }
&.list-item-danger { @include list-item-style-active($brand-danger, $gray-dark, $white); }
&.list-item-dark { @include list-item-style-active($brand-dark, $gray-dark, $white); }
}
// Linked list items
a.list-item {
color: $gray-dark;
text-decoration: none;
// Hover state
&:hover,
&:focus {
text-decoration: none;
//background-color: $list-group-hover-bg;
}
}
/**
* List editing styles. These trigger when the entire list goes into
* "edit mode"
*/
.list-editing {
.list-item-content {
margin-left: 30px;
margin-right: 30px;
}
.list-item-edit {
left: 0px;
opacity: 1;
}
}
/**
* The content area of a complex list item. This area can
* Slide left and right and be dragged to support different
* UI interactions.
*/
.list-item-content {
position: relative;
background-color: #fff;
z-index: 2;
padding: 15px 15px;
-webkit-transition: margin-left 0.2s ease-in-out, margin-right 0.2s ease-in-out, left 0.2s ease-in-out;
// Align icons to the right
> i:last-child {
float: right;
}
// Make every last form element go to the right of the item
> .toggle:last-child, input:last-child, > button:last-child {
float: right;
}
> .toggle:last-child {
margin-top: -5px;
}
}
.list-item-sliding {
-webkit-transition: -webkit-transform 0.1s ease-in-out;
}
.list-item-reordering {
position: absolute;
width: 100%;
}
.list-item-placeholder {
opacity: 0.7;
}
/**
* The left-side edit area of a complex list item. This area shows
* whe the list item is in edit mode.
*/
.list-item-edit {
position: absolute;
z-index: 0;
left: -48px;
top: 0;
width: 48px;
height: 100%;
line-height: 100%;
opacity: 0;
-webkit-transition: left 0.2s ease-in-out, opacity 0.2s ease-in-out;
.button {
height: 100%;
}
i {
color: $brand-danger;
font-size: 24px;
}
&.ng-enter {
-webkit-transition: left 0.2s ease-in-out, opacity 0.2s ease-in-out;
left: -48px;
opacity: 0;
}
&.ng-enter-active {
opacity: 1;
left: 0;
}
&.ng-leave {
-webkit-transition: left 0.2s ease-in-out, opacity 0.2s ease-in-out;
left: 0px;
opacity: 1;
}
&.ng-leave-active {
opacity: 0;
left: -48px;
}
}
.list-item-drag {
position: absolute;
z-index: 0;
right: 0;
top: 0;
height: 100%;
.button {
height: 100%;
border-radius: 0;
border: none;
}
}
/**
* The hidden right-side buttons that can be exposed under a list item
* with dragging.
*/
.list-item-buttons {
position: absolute;
z-index: 1;
right: 0;
top: 0;
height: 100%;
.button {
height: 100%;
border-radius: 0;
border: none;
}
}
/**
* A list divider.
*/
.list-divider {
padding: 5px 15px;
background-color: $list-divider-bg;
color: $list-divider-color;
font-weight: bold;
}
.list-item-heading {
margin-top: 0;
margin-bottom: 5px;
}
.list-item-text {
margin-bottom: 0;
line-height: 1.3;
}
/**
* List refreser elements
*/
.list-refresher {
background-color: red;
height: 0;
overflow: hidden;
}
.list-refreshing {
}