framework7
Version:
Full featured mobile HTML framework for building iOS & Android apps
244 lines (236 loc) • 5.17 kB
text/less
.ios {
@import (multiple) '../../less/colors-ios.less';
@import (multiple) '../../less/vars-ios.less';
.data-table {
thead {
th, td {
font-weight: 600;
&:not(.sortable-cell-active) {
color: #8e8e93;
}
}
i.icon, i.f7-icons {
font-size: 18px;
width: 18px;
height: 18px;
}
}
tbody {
tr.data-table-row-selected {
background: #f7f7f8;
}
}
th, td {
padding-left: 15px;
padding-right: 15px;
height: 44px;
&.checkbox-cell {
width: 22px;
.ltr({
padding-right: 7px;
+ td, + th {
padding-left: 8px;
}
});
.rtl({
padding-left: 7px;
+ td, + th {
padding-right: 8px;
}
});
}
&.actions-cell {
a.link + a.link {
.ltr({ margin-left: 15px; });
.rtl({ margin-right: 15px; });
}
a.icon-only {
width: 18px;
height: 18px;
line-height: 18px;
}
}
}
}
.ltr({
.sortable-cell:not(.numeric-cell):after {
margin-left: 5px;
}
.sortable-cell.numeric-cell:before {
margin-right: 5px;
}
.data-table.card, .card .data-table {
.card-header, .card-footer {
padding-left: 15px;
padding-right: 8px;
}
}
});
.rtl({
.sortable-cell:not(.numeric-cell):after {
margin-right: 5px;
}
.sortable-cell.numeric-cell:before {
margin-left: 5px;
}
.data-table.card, .card .data-table {
.card-header, .card-footer {
padding-right: 15px;
padding-left: 8px;
}
}
});
.data-table-title {
font-size: 17px;
font-weight: 600;
}
.data-table-links, .data-table-actions {
a.link + a.link {
.ltr({ margin-left: 15px; });
.rtl({ margin-right: 15px; });
}
}
.data-table-actions {
a.link.icon-only {
width: 44px;
height: 44px;
}
i.icon, i.f7-icons {
font-size: 22px;
}
}
.data-table .card-header {
> .data-table-header, > .data-table-header-selected {
padding-top: 10px;
padding-bottom: 10px;
height: 100%;
.ltr({
padding-left: 15px;
padding-right: 8px;
margin-left: -15px;
margin-right: -8px;
});
.rtl({
padding-right: 15px;
padding-left: 8px;
margin-right: -15px;
margin-left: -8px;
});
}
}
.data-table-header-selected {
background: rgba(red(@themeColor), green(@themeColor), blue(@themeColor), 0.1);
}
.data-table-title-selected {
color: @themeColor;
}
.hairline-root('.data-table tbody td', top, #c8c7cc);
&.device-desktop .data-table {
tbody tr:hover {
background: #f7f7f8;
}
}
// Footer
.data-table-footer {
height: 44px;
color: #8e8e93;
}
.data-table-rows-select,
.data-table-pagination {
a.link {
width: 44px;
height: 44px;
}
}
.data-table-rows-select {
+ .data-table-pagination {
.ltr({
margin-left: 30px;
});
.rtl({
margin-right: 30px;
});
}
.input {
.ltr({
margin-left: 20px;
});
.rtl({
margin-right: 20px;
});
}
}
.data-table-pagination-label {
.ltr({
margin-right: 15px;
});
.rtl({
margin-left: 15px;
});
}
.hairline-root('.data-table-footer', top, #c8c7cc);
// Inputs
.input-cell {
padding-top: 8px;
padding-bottom: 8px;
height: auto;
vertical-align: top;
.table-head-label + .input {
margin-top: 4px;
}
.input {
height: 24px;
input, textarea, select {
height: 24px;
color: #000;
font-size: 14px;
}
}
}
// Collapsible
@media (max-width:480px) and (orientation:portrait) {
.data-table.data-table-collapsible {
td:not(.checkbox-cell) {
&:before {
color: #8e8e93;
font-weight: 600;
}
}
}
.hairline-root('.data-table-collapsible tr', top, #c8c7cc);
}
// Dark Theme
& when (@includeDarkTheme) {
.theme-dark {
.data-table, .data-table& {
tbody td {
.hairline-color(top, @blockBorderColorDark);
}
&.data-table-collapsible tr {
.hairline-color(top, @blockBorderColorDark);
}
tbody {
tr.data-table-row-selected {
background-color: #363636;
}
}
}
}
&.device-desktop .theme-dark .data-table,
&.device-desktop .theme-dark.data-table {
tbody tr:hover {
background: #363636;
}
}
}
.color-theme-loop({
.color-theme-@{colorThemeName} .data-table-header-selected,
.data-table-header-selected.color-@{colorThemeName} {
background: rgba(red(@colorThemeValue), green(@colorThemeValue), blue(@colorThemeValue), 0.1);
}
.color-theme-@{colorThemeName} .data-table-title-selected,
.color-@{colorThemeName} .data-table-title-selected {
color: @colorThemeValue;
}
});
}