Files
2013-10-23 13:47:25 -05:00

386 lines
7.6 KiB
SCSS

// List
// -------------------------------
.list {
position: relative;
overflow: hidden;
// No need to set list-style: none; since .list-item is block level
margin-bottom: 20px;
padding-top: $list-item-border-width;
padding-bottom: $list-item-border-width;
padding-left: 0; // reset padding because ul and ol
// make room for the list item borders
}
// List Item
// -------------------------------
.list-item {
position: relative;
z-index: 2; // Make sure the borders and stuff don't get hidden by children
display: block;
margin: $list-item-border-width * -1;
border: none;
background-color: $list-default-background;
box-shadow: inset 0 0 $list-item-border-width #666;
// Align badges within list items
.badge {
float: right;
}
.badge + .badge {
margin-right: 5px;
}
// Active class on item itself, not parent
&.active,
&.active:hover,
&.active:focus {
z-index: 2;
// Force color to inherit for custom content
.list-item-heading {
color: inherit;
}
}
// 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;
}
}
/**
* List editing styles. These trigger when the entire list goes into
* "edit mode"
*/
.list-editing {
.list-item-content {
margin-right: 30px;
margin-left: 30px;
}
.list-item-edit {
left: 0px;
opacity: 1;
}
}
// List Item Content
// -------------------------------
.list-item-content {
/**
* The content area of a complex list item. This area can
* Slide left and right and be dragged to support different
* UI interactions.
*/
position: relative;
z-index: 2;
overflow: hidden;
padding: $list-item-padding (($list-item-padding * 3) - 5) $list-item-padding $list-item-padding;
border: none;
background-color: #fff;
box-shadow: inset 0 0 $list-item-border-width #666;
text-overflow: ellipsis;
white-space: nowrap;
font-size: $list-font-size;
-webkit-transition: margin-left 0.2s ease-in-out, margin-right 0.2s ease-in-out, left 0.2s ease-in-out;
h1:last-child,
h2:last-child,
h3:last-child,
h4:last-child,
h5:last-child,
h6:last-child,
p:last-child {
margin-bottom: 0;
}
}
.list-item-text-wrap {
overflow: auto;
white-space: normal;
}
// List Icons
// -------------------------------
.list-item-content i {
position: absolute;
top: 0;
display: flex;
height: 100%;
font-size: $list-icon-font-size;
align-items: center;
}
.list-icon-left .list-item-content {
padding-left: ($list-item-padding * 3);
i {
left: $list-item-padding / 2;
}
}
.list-icon-right .list-item-content i {
right: $list-item-padding / 2;
}
.list-icon-left.list-icon-right .list-item-content i:last-child {
left: auto;
}
a .list-item-content:after,
button .list-item-content:after {
/* By default, both <a> and <button> have right side arrow icons */
position: absolute;
top: 0;
right: $list-item-padding - 4;
display: flex;
height: 100%;
color: #ccc;
content: "\e0fc"; // icon-chevron-right
text-transform: none;
font-weight: normal;
font-style: normal;
font-variant: normal;
font-size: 16px;
font-family: 'ionicons';
line-height: 1;
speak: none;
-webkit-font-smoothing: antialiased;
align-items: center;
}
// do not show the default right arrow when they want their own right side icon
a.list-icon-right,
button.list-icon-right {
.list-item-content:after {
display: none;
}
}
// List Thumbnails
// -------------------------------
.list-thumbnail h2,
.list-thumbnail-lrg h2 {
margin: 0 0 8px 0;
font-size: 16px;
}
.list-thumbnail .list-item-content {
padding-left: $list-thumbnail-width + ($list-item-padding * 2);
min-height: $list-thumbnail-width + ($list-item-padding * 2);
img:first-child, .list-img {
position: absolute;
top: $list-item-padding;
left: $list-item-padding;
max-width: $list-thumbnail-width;
max-height: $list-thumbnail-height;
width: 100%;
border-radius: 4px;
}
}
.list-thumbnail-lrg .list-item-content {
padding-left: $list-thumbnail-lrg-width + $list-item-padding;
min-height: $list-thumbnail-lrg-height;
img:first-child, .list-img {
position: absolute;
top: 0;
left: 0;
max-width: $list-thumbnail-lrg-width;
max-height: $list-thumbnail-lrg-height;
width: 100%;
}
}
// List Header
// -------------------------------
.list-header {
margin-top: $list-header-margin-top;
padding: $list-header-padding;
background-color: $list-header-bg;
color: $list-header-color;
font-weight: bold;
}
// List Divider
// -------------------------------
.list-divider {
margin: $list-item-border-width * -1;
padding: $list-divider-padding;
border: none;
background-color: $list-divider-bg;
box-shadow: inset 0 0 $list-item-border-width #666;
color: $list-divider-color;
font-weight: bold;
}
.card.list .list-divider {
margin-right: 0;
margin-left: 0;
}
// inset so they layout the same as list items
.list-divider,
.list-header {
//margin-left: $list-item-border-width * -1;
//margin-right: $list-item-border-width * -1;
}
// List Animations
// -------------------------------
.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;
top: 0;
left: -48px;
z-index: 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 {
left: -48px;
opacity: 0;
-webkit-transition: left 0.2s ease-in-out, opacity 0.2s ease-in-out;
}
&.ng-enter-active {
left: 0;
opacity: 1;
}
&.ng-leave {
left: 0px;
opacity: 1;
-webkit-transition: left 0.2s ease-in-out, opacity 0.2s ease-in-out;
}
&.ng-leave-active {
left: -48px;
opacity: 0;
}
}
.list-item-drag {
position: absolute;
top: 0;
right: 0;
z-index: 0;
height: 100%;
.button {
height: 100%;
border: none;
border-radius: 0;
}
}
/**
* The hidden right-side buttons that can be exposed under a list item
* with dragging.
*/
.list-item-buttons {
position: absolute;
top: 0;
right: 0;
z-index: 1;
height: 100%;
.button {
height: 100%;
border: none;
border-radius: 0;
}
}
// List Refresher
// -------------------------------
.list-refresher {
overflow: hidden;
height: 0;
background-color: red;
}
.list-refreshing {
}
// when its a card make sure it doesn't duplicate top and bottom borders
.card.list .list-item {
padding-right: 1px;
padding-left: 1px;
}
.list-label-right {
float: right;
color: #aaa;
font-size: 14px;
}