grafana/public/sass/components/_cards.scss

218 lines
3.2 KiB
SCSS
Raw Normal View History

.layout-selector {
@include clearfix();
2019-03-12 02:10:31 -05:00
margin-left: $space-md;
text-align: right;
button {
background: $input-label-bg;
color: $text-color-weak;
box-shadow: $card-shadow;
border: none;
2019-03-12 02:10:31 -05:00
padding: $space-sm;
line-height: 1;
font-size: 130%;
float: right;
&:focus {
outline: none;
}
&.active {
background-color: lighten($input-label-bg, 5%);
color: $link-color;
}
&:nth-child(2) {
border-radius: 3px 0 0 3px;
2017-04-11 00:43:40 -05:00
border-right: $panel-border;
}
&:nth-child(1) {
border-radius: 0 3px 3px 0;
}
}
}
.card-section {
margin-bottom: $space-xl;
}
.card-list {
display: flex;
flex-direction: row;
flex-wrap: wrap;
list-style-type: none;
}
.card-item {
display: block;
height: 100%;
background: $card-background;
box-shadow: $card-shadow;
2019-03-12 02:10:31 -05:00
padding: $space-md;
border-radius: 4px;
&:hover {
background: $card-background-hover;
}
.label-tag {
2019-03-12 02:10:31 -05:00
margin-left: $space-sm;
font-size: 11px;
padding: 2px 6px;
}
}
.card-item-body {
display: flex;
overflow: hidden;
}
.card-item-details {
overflow: hidden;
}
.card-item-header {
2019-03-12 02:10:31 -05:00
margin-bottom: $space-md;
2016-04-11 12:42:52 -05:00
}
.card-item-type {
color: $text-color-weak;
text-transform: uppercase;
font-size: $font-size-sm;
2017-08-15 10:52:52 -05:00
font-weight: $font-weight-semi-bold;
}
.card-item-badge {
margin: 6px 0;
}
2016-04-11 12:42:52 -05:00
.card-item-notice {
font-size: $font-size-sm;
}
.card-item-name {
color: $headings-color;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
}
2019-02-01 08:03:19 -06:00
.card-item-label {
2019-03-12 02:10:31 -05:00
margin-left: $space-sm;
2019-02-01 08:03:19 -06:00
}
.card-item-sub-name {
color: $text-color-weak;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
}
2016-04-07 14:11:54 -05:00
.card-item-sub-name--header {
color: $text-color-weak;
text-transform: uppercase;
2019-03-12 02:10:31 -05:00
margin-bottom: $space-md;
2016-04-07 14:11:54 -05:00
font-size: $font-size-sm;
font-weight: bold;
}
.card-list-layout-grid {
2016-04-11 12:42:52 -05:00
.card-item-type {
display: inline-block;
}
.card-item-notice {
font-size: $font-size-sm;
display: inline-block;
2019-03-12 02:10:31 -05:00
margin-left: $space-md;
2016-04-11 12:42:52 -05:00
}
.card-item-header-action {
float: right;
}
.card-item-wrapper {
width: 100%;
2019-03-12 02:10:31 -05:00
padding: 0 $space-md $space-md 0;
}
2016-04-08 17:46:45 -05:00
.card-item-wrapper--clickable {
cursor: pointer;
}
.card-item-figure {
2019-03-12 02:10:31 -05:00
margin: 0 $space-md $space-md 0;
2019-03-21 04:43:06 -05:00
height: 80px;
img {
2019-03-21 04:43:06 -05:00
width: 80px;
2017-08-15 10:52:52 -05:00
}
}
.card-item-name {
font-size: $font-size-h3;
}
@include media-breakpoint-up(md) {
.card-item-wrapper {
width: 50%;
}
}
@include media-breakpoint-up(lg) {
.card-item-wrapper {
width: 33.333333%;
}
}
&.card-list-layout-grid--max-2-col {
@include media-breakpoint-up(lg) {
.card-item-wrapper {
width: 50%;
}
2016-04-07 14:11:54 -05:00
}
}
}
.card-list-layout-list {
.card-item-wrapper {
padding: 0;
width: 100%;
margin-bottom: $space-xs;
}
2016-04-08 17:46:45 -05:00
.card-item-wrapper--clickable {
cursor: pointer;
}
.card-item {
border-radius: 2px;
}
.card-item-header {
float: right;
2016-04-11 12:42:52 -05:00
text-align: right;
}
.card-item-figure {
2019-03-12 02:10:31 -05:00
margin: 0 $space-md 0 0;
img {
width: 48px;
}
}
.card-item-name {
font-size: $font-size-h4;
}
.card-item-sub-name {
font-size: $font-size-sm;
}
.layout-selector {
margin-right: 0;
}
}