ratchet/sass/table-views.scss

109 строки
2.3 KiB
SCSS
Исходник Обычный вид История

2013-09-15 00:42:06 +04:00
//
// Table views
// --------------------------------------------------
2012-11-05 04:03:39 +04:00
.table-view {
2014-02-21 06:02:13 +04:00
padding-left: 0;
margin-top: 0;
margin-bottom: 15px;
2013-09-15 00:42:06 +04:00
list-style: none; // Remove usual bullet styles from table view
2012-11-05 04:03:39 +04:00
background-color: #fff;
2014-02-15 23:30:18 +04:00
border-top: $border-default;
border-bottom: $border-default;
2014-02-21 06:02:13 +04:00
}
// Pad each table view item and add dividers
.table-view-cell {
position: relative;
padding: 11px 65px 11px 15px;
2014-04-01 09:27:34 +04:00
overflow: hidden;
2014-02-21 06:02:13 +04:00
border-bottom: $border-default;
2013-09-15 00:42:06 +04:00
2014-02-21 06:02:13 +04:00
// Remove the border from the last table view item
2014-02-26 14:07:55 +04:00
&:last-child {
2014-02-21 06:02:13 +04:00
border-bottom: 0;
}
// If it's a table view of links, make sure the child <a> takes up full table view item tap area (want to avoid selecting child buttons though)
> a:not(.btn) {
2013-09-15 00:42:06 +04:00
position: relative;
2014-02-21 06:02:13 +04:00
display: block;
padding: inherit;
margin: -11px -65px -11px -15px; // Make the entire list item tappable.
2014-04-01 09:27:34 +04:00
overflow: hidden;
2014-02-21 06:02:13 +04:00
color: inherit;
2014-02-21 06:02:13 +04:00
&:active {
background-color: #eee;
2013-09-16 10:16:34 +04:00
}
2013-09-15 00:42:06 +04:00
}
2014-02-21 06:02:13 +04:00
p {
margin-bottom: 0;
}
}
2013-09-15 00:42:06 +04:00
2014-02-21 06:02:13 +04:00
// Table view dividers
// --------------------------------------------------
.table-view-divider {
padding-top: 6px;
padding-bottom: 6px;
padding-left: 15px;
2014-02-26 14:07:55 +04:00
margin-top: -1px; // Hides the border of the previous list item
2014-02-21 06:02:13 +04:00
margin-left: 0;
font-weight: $font-weight;
2014-04-01 09:27:34 +04:00
color: #999;
background-color: #fafafa;
2014-02-21 06:02:13 +04:00
border-top: $border-default;
border-bottom: $border-default;
2013-09-23 04:33:05 +04:00
}
2014-02-09 10:52:53 +04:00
2014-02-10 05:06:29 +04:00
// Table-views with media (images,avatars, icons)
// --------------------------------------------------
2014-02-10 05:06:29 +04:00
.table-view .media,
.table-view .media-body {
overflow: hidden;
}
.table-view .media-object {
&.pull-left {
margin-right: 10px;
}
2014-02-10 05:06:29 +04:00
&.pull-right {
margin-left: 10px;
}
}
2013-12-21 23:17:43 +04:00
// Table-views with buttons, badges and toggles
2013-09-23 04:33:05 +04:00
// --------------------------------------------------
.table-view-cell,
.table-view-cell > a {
> .btn,
> .badge,
> .toggle {
position: absolute;
top: 50%;
right: 15px;
@include transform(translateY(-50%));
2014-02-10 03:07:40 +04:00
}
// If the cell has a chevron, give some more room.
2014-03-02 05:16:50 +04:00
.navigate-left,
.navigate-right,
.push-left,
.push-right {
> .btn,
> .badge,
> .toggle {
right: 35px;
}
}
2014-02-10 03:07:40 +04:00
}
2014-02-17 00:56:59 +04:00
// If the table view is the first component, give it extra margin on top.
.content > .table-view:first-child {
margin-top: 15px;
}