mirror of https://github.com/twbs/ratchet.git
Build mobile apps with simple HTML, CSS, and JS components.
http://goratchet.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
118 lines
3.0 KiB
118 lines
3.0 KiB
11 years ago
|
/* Table views
|
||
12 years ago
|
-------------------------------------------------- */
|
||
|
|
||
11 years ago
|
// Remove usual bullet styles from table view
|
||
|
.table-view {
|
||
12 years ago
|
list-style: none;
|
||
|
background-color: #fff;
|
||
|
}
|
||
|
|
||
11 years ago
|
// Pad each table view item and add dividers
|
||
|
.table-view li {
|
||
12 years ago
|
position: relative;
|
||
11 years ago
|
padding: 11px 60px 11px 0; // Given extra right padding to accomodate counts, chevrons or buttons
|
||
11 years ago
|
margin-left: 15px;
|
||
12 years ago
|
border-bottom: 1px solid rgba(0, 0, 0, .1);
|
||
|
}
|
||
|
|
||
11 years ago
|
// Give top border to first list items
|
||
11 years ago
|
.table-view li:first-child {
|
||
12 years ago
|
border-top: 1px solid rgba(0, 0, 0, .1);
|
||
|
}
|
||
|
|
||
11 years ago
|
// Remove the border from the last list item
|
||
11 years ago
|
.table-view li:last-child {
|
||
11 years ago
|
border-bottom: 0;
|
||
|
}
|
||
|
|
||
11 years ago
|
// If 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)
|
||
|
.table-view li > a:not([class*="button"]) {
|
||
12 years ago
|
position: relative;
|
||
|
display: block;
|
||
|
padding: inherit;
|
||
11 years ago
|
margin: -11px -60px -11px 0;
|
||
12 years ago
|
color: inherit;
|
||
|
}
|
||
|
|
||
11 years ago
|
/* Inset table view
|
||
12 years ago
|
-------------------------------------------------- */
|
||
|
|
||
11 years ago
|
.table-view.inset {
|
||
12 years ago
|
width: auto;
|
||
|
margin-right: 10px;
|
||
|
margin-left: 10px;
|
||
|
border: 1px solid rgba(0, 0, 0, .1);
|
||
|
border-radius: 6px;
|
||
|
box-sizing: border-box;
|
||
|
}
|
||
|
|
||
11 years ago
|
// Remove border from first/last standard list items to avoid double border at top/bottom of table views
|
||
|
.table-view.inset li:first-child {
|
||
12 years ago
|
border-top-width: 0;
|
||
|
}
|
||
11 years ago
|
.table-view.inset li:last-child {
|
||
12 years ago
|
border-bottom-width: 0;
|
||
|
}
|
||
|
|
||
|
|
||
11 years ago
|
/* table view dividers
|
||
12 years ago
|
-------------------------------------------------- */
|
||
|
|
||
11 years ago
|
.table-view .table-view-divider {
|
||
12 years ago
|
position: relative;
|
||
|
top: -1px;
|
||
|
padding-top: 6px;
|
||
|
padding-bottom: 6px;
|
||
11 years ago
|
padding-left: 15px;
|
||
|
margin-left: 0;
|
||
12 years ago
|
font-weight: bold;
|
||
|
line-height: 18px;
|
||
|
background-color: #f8f8f8;
|
||
|
border-top: 1px solid rgba(0, 0, 0, .1);
|
||
|
border-bottom: 1px solid rgba(0, 0, 0, .1);
|
||
|
box-shadow: inset 0 1px 1px rgba(255, 255, 255, .4);
|
||
|
}
|
||
|
|
||
|
/* Rounding first divider on inset lists and remove border on the top */
|
||
11 years ago
|
.table-view.inset .table-view-divider:first-child {
|
||
12 years ago
|
top: 0;
|
||
|
border-top-width: 0;
|
||
|
border-radius: 6px 6px 0 0;
|
||
|
}
|
||
|
|
||
11 years ago
|
/* Rounding last divider on inset table views */
|
||
|
.table-view.inset .table-view-divider:last-child {
|
||
12 years ago
|
border-radius: 0 0 6px 6px;
|
||
|
}
|
||
|
|
||
11 years ago
|
/* Right-aligned subcontent in table views (chevrons, buttons, counts and toggles)
|
||
12 years ago
|
-------------------------------------------------- */
|
||
11 years ago
|
.table-view .chevron,
|
||
|
.table-view [class*="button"],
|
||
|
.table-view [class*="count"],
|
||
|
.table-view .toggle {
|
||
12 years ago
|
position: absolute;
|
||
|
top: 50%;
|
||
|
right: 10px;
|
||
|
}
|
||
|
|
||
11 years ago
|
/* Position chevrons/counts vertically centered on the right in table view items */
|
||
|
.table-view .chevron,
|
||
|
.table-view [class*="count"] {
|
||
12 years ago
|
margin-top: -10px; /* Half height of chevron */
|
||
|
}
|
||
|
|
||
|
/* Push count over if there's a sibling chevron */
|
||
11 years ago
|
.table-view .chevron + [class*="count"] {
|
||
12 years ago
|
right: 30px;
|
||
|
}
|
||
|
|
||
11 years ago
|
/* Position buttons vertically centered on the right in table view items */
|
||
|
.table-view [class*="button"] {
|
||
12 years ago
|
left: auto;
|
||
|
margin-top: -14px; /* Half height of button */
|
||
|
}
|
||
|
|
||
11 years ago
|
.table-view .toggle {
|
||
12 years ago
|
margin-top: -15px; /* Half height of toggle */
|
||
|
}
|