// // Custom list that can either be used with a table or divs. // .table-items { & { margin-bottom: -.25rem; } th, td { // Unified padding for all table cells. & { padding: .75rem; } // Additional padding for the first column. &:first-child { padding-left: 1.25rem !important; } // Additional padding for the last. column. &:last-child { padding-right: 1.25rem !important; } } td { border-top: 0; } thead { // Small font size for the table header, content is more important! th { border: 0; color: $color-table-header; font-size: .8rem; font-weight: normal; padding-top: 0; vertical-align: middle; // Auto truncate all header elements. & > span { @include truncate; } } } // // Use the list style with a table. // tbody { td { margin: 0; margin-bottom: 10px; vertical-align: middle; } tr { // Each row is white and a has a border. & { background: $color-table-background; border: 1px solid $color-table-border; border-bottom: 2px solid $color-table-border; margin-bottom: .5rem; } &:focus { outline: none; } // Blue background and white text when active. &.active { & { background: $color-theme-blue; border-color: $color-theme-blue; color: $color-dark-foreground; } .btn-text { &, &:hover { // Enforce white color for links. color: $color-dark-foreground; } } } } } // // Use the list style with divs. // &-row { & { background: $color-table-background; border: 1px solid $color-border; border-bottom-width: 2px; border-top: 0; margin-bottom: .25rem; padding: .75rem 1.25rem; } // Summary row for expandable rows. &-summary { line-height: 2.5rem; padding: .75rem 1.25rem; position: relative; } &-expandable { padding: 0; } &-empty { color: $color-text-decent; } // Detail row for expandable rows. &-details { & { position: relative; } // Caret that is placed next to the expand button. &::before { @include caret-top($color-theme-secondary); @include absolute(-1.1rem, 0, auto, auto); } &-tab { padding: 1.5rem; } &-tabs { background: $color-table-footer; height: 70px; padding: 1rem 1.25rem; position: relative; } } } // Footer that typically contains an add-item-form. &-header, &-footer { background: $color-table-footer; border: 1px solid $color-input; border-bottom-width: 2px; padding: .75rem 1.25rem; } &-header { margin-bottom: .8rem; } &-footer { margin-top: .8rem; } // Edit or expand button. &-edit-button { & { color: $color-theme-blue; padding-left: 0; padding-right: 0; width: 2.2rem; } &:hover { color: $color-theme-blue-dark !important; } &.active { background: $color-theme-blue !important; border-color: $color-theme-blue !important; color: $color-dark-foreground !important; } } // Spacer item between two normal items, because table rows cannot have margins. .spacer { border: 0; height: .25rem; } } // // Cell styles // .cell { &-40 { @include force-width(40%); } &-60 { @include force-width(60%); } &-select { @include force-width(50px); } &-label { @include force-width(100px); } &-separator { @include force-width(60px); } &-user { @include force-width(55px); } &-time { @include force-width(180px); } &-actions { @include force-width(70px); } &-actions-lg { @include force-width(150px); } &-content { min-width: 200px; } &-separator, &-select { text-align: center; } &-auto-right, &-actions, &-actions-lg { text-align: right; } &-actions-left { text-align: left; } } // // Table cell with truncated content. // .table-cell { @include truncate; } // // Lightweight pagination controls. // .pagination { & { margin-top: 1rem; } &-text { line-height: 2.2rem; } &-button { & { color: $color-text; font-size: 1.1rem; font-weight: bold; margin-left: .4rem; } &:hover, &.active { color: darken($color-text, 20%); } } }