AdminLTE/build/scss/_cards.scss

422 lines
6.4 KiB
SCSS
Raw Normal View History

//
// Component: Cards
//
2018-03-17 17:07:55 +00:00
.card {
2018-04-14 23:33:53 +00:00
@include box-shadow($card-shadow);
margin-bottom: map-get($spacers, 3);
2018-03-17 17:07:55 +00:00
&.bg-dark {
2019-08-08 12:32:33 +00:00
.card-header {
border-color: $card-dark-border-color;
}
2018-03-17 17:07:55 +00:00
&,
.card-body {
color: $white;
}
}
&.maximized-card {
height: 100% !important;
left: 0;
max-height: 100% !important;
max-width: 100% !important;
position: fixed;
top: 0;
width: 100% !important;
z-index: 9999;
&.was-collapsed .card-body {
display: block !important;
}
[data-widget='collapse'] {
display: none;
}
.card-header,
.card-footer {
@include border-radius(0 !important);
}
}
2018-03-17 17:07:55 +00:00
// collapsed mode
&.collapsed-card {
.card-body,
.card-footer {
display: none;
}
}
.nav.flex-column {
> li {
border-bottom: 1px solid $card-border-color;
margin: 0;
2018-03-17 17:07:55 +00:00
&:last-of-type {
border-bottom: 0;
2018-03-17 17:07:55 +00:00
}
}
}
// fixed height to 300px
&.height-control {
.card-body {
max-height: 300px;
overflow: auto;
}
}
.border-right {
border-right: 1px solid $card-border-color;
}
.border-left {
border-left: 1px solid $card-border-color;
}
&.card-tabs {
&:not(.card-outline) {
& .card-header {
border-bottom: 0;
.nav-item {
&:first-child .nav-link {
margin-left: -1px;
}
}
}
}
&.card-outline {
.nav-item {
border-bottom: 0;
&:first-child .nav-link {
border-left: 0;
margin-left: 0;
}
}
}
}
&.card-outline-tabs {
border-top: 0;
.card-header {
.nav-item {
&:first-child .nav-link {
border-left: 0;
margin-left: 0;
}
}
a {
border-top: 3px solid transparent;
&:hover {
border-top: 3px solid $nav-tabs-border-color;
}
&.active {
&:hover {
margin-top: 0;
}
}
}
}
}
2018-03-17 17:07:55 +00:00
}
// Maximized Card Body Scroll fix
html.maximized-card {
overflow: hidden;
}
2018-03-17 17:07:55 +00:00
// Add clearfix to header, body and footer
.card-header,
.card-body,
.card-footer {
@include clearfix;
2018-03-17 17:07:55 +00:00
}
// Box header
.card-header {
background-color: transparent;
border-bottom: 1px solid $card-border-color;
2019-08-31 08:20:46 +00:00
padding: (($card-spacer-y / 2) * 2) $card-spacer-x;
position: relative;
2018-03-17 17:07:55 +00:00
@if $enable-rounded {
@include border-top-radius($border-radius);
}
.collapsed-card & {
border-bottom: 0;
2018-03-17 17:07:55 +00:00
}
> .card-tools {
float: right;
margin-right: -$card-spacer-x / 2;
.input-group,
.nav,
.pagination {
margin-bottom: -$card-spacer-y / 2.5;
margin-top: -$card-spacer-y / 2.5;
}
2018-03-17 17:07:55 +00:00
[data-toggle='tooltip'] {
2018-03-17 17:07:55 +00:00
position: relative;
}
}
}
.card-title {
float: left;
2018-03-17 17:07:55 +00:00
font-size: $card-title-font-size;
font-weight: $card-title-font-weight;
margin: 0;
}
.card-text {
clear: both;
}
2018-03-17 17:07:55 +00:00
// Box Tools Buttons
.btn-tool {
background: transparent;
color: $gray-500;
font-size: $font-size-sm;
2019-08-31 08:20:46 +00:00
margin: -(($card-spacer-y / 2) * 2) 0;
padding: .25rem .5rem;
2018-03-17 17:07:55 +00:00
.btn-group.show &,
&:hover {
color: $gray-700;
}
.show &,
&:focus {
box-shadow: none !important;
}
}
.text-sm {
.card-title {
font-size: $card-title-font-size-sm;
}
.nav-link {
padding: $card-nav-link-padding-sm-y $card-nav-link-padding-sm-x;
}
}
2018-03-17 17:07:55 +00:00
// Box Body
.card-body {
// @include border-radius-sides(0, 0, $border-radius, $border-radius);
// .no-header & {
// @include border-top-radius($border-radius);
// }
2018-03-17 17:07:55 +00:00
// Tables within the box body
> .table {
margin-bottom: 0;
2018-03-17 17:07:55 +00:00
> thead > tr > th,
> thead > tr > td {
border-top-width: 0;
}
}
// Calendar within the box body
.fc {
margin-top: 5px;
}
.full-width-chart {
margin: -19px;
}
&.p-0 .full-width-chart {
margin: -9px;
}
}
.chart-legend {
@include list-unstyled;
2018-03-17 17:07:55 +00:00
margin: 10px 0;
2018-03-17 17:07:55 +00:00
> li {
@media (max-width: map-get($grid-breakpoints, sm)) {
float: left;
margin-right: 10px;
}
}
}
// Comment Box
.card-comments {
background: $gray-100;
2018-03-17 17:07:55 +00:00
.card-comment {
@include clearfix;
border-bottom: 1px solid $gray-200;
2018-03-17 17:07:55 +00:00
padding: 8px 0;
2018-03-17 17:07:55 +00:00
&:last-of-type {
border-bottom: 0;
}
2018-03-17 17:07:55 +00:00
&:first-of-type {
padding-top: 0;
}
2018-03-17 17:07:55 +00:00
img {
height: $card-img-size;
width: $card-img-size;
2018-03-17 17:07:55 +00:00
float: left;
}
}
2018-03-17 17:07:55 +00:00
.comment-text {
color: lighten($gray-700, 20%);
2018-03-17 17:07:55 +00:00
margin-left: 40px;
}
2018-03-17 17:07:55 +00:00
.username {
color: $gray-700;
2018-03-17 17:07:55 +00:00
display: block;
font-weight: 600;
}
2018-03-17 17:07:55 +00:00
.text-muted {
font-size: 12px;
font-weight: 400;
2018-03-17 17:07:55 +00:00
}
}
// Widgets
//-----------
// Widget: TODO LIST
.todo-list {
list-style: none;
margin: 0;
2018-03-17 17:07:55 +00:00
overflow: auto;
padding: 0;
2018-03-17 17:07:55 +00:00
// Todo list element
> li {
@include border-radius(2px);
background: $gray-100;
border-left: 2px solid $gray-200;
color: $gray-700;
2018-03-17 17:07:55 +00:00
margin-bottom: 2px;
padding: 10px;
2018-03-17 17:07:55 +00:00
&:last-of-type {
margin-bottom: 0;
}
> input[type='checkbox'] {
margin: 0 10px 0 5px;
}
.text {
display: inline-block;
font-weight: 600;
margin-left: 5px;
2018-03-17 17:07:55 +00:00
}
// Time labels
.badge {
font-size: .7rem;
margin-left: 10px;
2018-03-17 17:07:55 +00:00
}
// Tools and options box
.tools {
color: theme-color('danger');
2018-03-17 17:07:55 +00:00
display: none;
float: right;
2018-03-17 17:07:55 +00:00
// icons
> .fa,
> .fas,
> .far,
> .fab,
> .glyphicon,
> .ion {
2018-03-17 17:07:55 +00:00
cursor: pointer;
margin-right: 5px;
2018-03-17 17:07:55 +00:00
}
}
2018-03-17 17:07:55 +00:00
&:hover .tools {
display: inline-block;
}
&.done {
color: darken($gray-500, 25%);
2018-03-17 17:07:55 +00:00
.text {
font-weight: 500;
text-decoration: line-through;
2018-03-17 17:07:55 +00:00
}
.badge {
2018-03-17 17:07:55 +00:00
background: $gray-500 !important;
}
}
}
// Color variants
@each $name, $color in $theme-colors {
.#{$name} {
border-left-color: $color;
}
2018-03-17 17:07:55 +00:00
}
@each $name, $color in $colors {
.#{$name} {
border-left-color: $color;
}
2018-03-17 17:07:55 +00:00
}
.handle {
cursor: move;
display: inline-block;
2018-03-17 17:07:55 +00:00
margin: 0 5px;
}
}
// END TODO WIDGET
// Input in box
.card-input {
max-width: 200px;
}
// Color variants
2018-03-17 17:07:55 +00:00
@each $name, $color in $theme-colors {
@include cards-variant($name, $color);
}
@each $name, $color in $colors {
@include cards-variant($name, $color);
2018-03-17 17:07:55 +00:00
}
// Nav Tabs override
.card-default {
.nav-item {
&:first-child .nav-link {
border-left: 0;
}
}
}