AdminLTE/build/scss/_small-box.scss

166 lines
2.4 KiB
SCSS
Raw Normal View History

//
// Component: Small Box
//
2015-10-31 22:00:16 +01:00
.small-box {
2018-04-15 01:33:53 +02:00
@include border-radius($border-radius);
@include box-shadow($card-shadow);
2015-10-31 22:00:16 +01:00
display: block;
margin-bottom: 20px;
position: relative;
2018-03-17 18:07:55 +01:00
2015-10-31 22:00:16 +01:00
// content wrapper
> .inner {
padding: 10px;
}
> .small-box-footer {
background-color: rgba($black, .1);
color: rgba($white, .8);
2015-10-31 22:00:16 +01:00
display: block;
padding: 3px 0;
position: relative;
text-align: center;
2015-10-31 22:00:16 +01:00
text-decoration: none;
z-index: 10;
2015-10-31 22:00:16 +01:00
&:hover {
background-color: rgba($black, .15);
2018-03-17 18:07:55 +01:00
color: $white;
2015-10-31 22:00:16 +01:00
}
}
h3 {
@include font-size(2.2rem);
font-weight: 700;
margin: 0 0 10px;
2015-10-31 22:00:16 +01:00
padding: 0;
white-space: nowrap;
}
@include media-breakpoint-up(lg) {
.col-xl-2 &,
.col-lg-2 &,
.col-md-2 & {
h3 {
@include font-size(1.6rem);
}
}
2015-10-31 22:00:16 +01:00
.col-xl-3 &,
.col-lg-3 &,
.col-md-3 & {
h3 {
@include font-size(1.6rem);
}
}
}
@include media-breakpoint-up(xl) {
.col-xl-2 &,
.col-lg-2 &,
.col-md-2 & {
h3 {
@include font-size(2.2rem);
}
}
.col-xl-3 &,
.col-lg-3 &,
.col-md-3 & {
h3 {
@include font-size(2.2rem);
}
}
2015-10-31 22:00:16 +01:00
}
p {
font-size: 1rem;
2015-10-31 22:00:16 +01:00
> small {
color: $gray-100;
display: block;
font-size: .9rem;
2015-10-31 22:00:16 +01:00
margin-top: 5px;
}
}
h3,
p {
2018-03-17 18:07:55 +01:00
z-index: 5;
2015-10-31 22:00:16 +01:00
}
// the icon
.icon {
color: rgba($black, .15);
2015-10-31 22:00:16 +01:00
z-index: 0;
> i {
font-size: 90px;
position: absolute;
right: 15px;
top: 15px;
transition: transform $transition-speed linear;
&.fa,
&.fas,
&.far,
&.fab,
&.fal,
&.fad,
&.ion {
font-size: 70px;
top: 20px;
}
}
svg {
font-size: 70px;
position: absolute;
right: 15px;
top: 15px;
transition: transform $transition-speed linear;
}
2015-10-31 22:00:16 +01:00
}
// Small box hover state
&:hover {
text-decoration: none;
2015-10-31 22:00:16 +01:00
// Animate icons on small box hover
.icon {
> i {
&,
&.fa,
&.fas,
&.far,
&.fab,
&.fal,
&.fad,
&.ion {
transform: scale(1.1);
}
}
> svg {
transform: scale(1.1);
}
2015-10-31 22:00:16 +01:00
}
}
}
2016-01-16 17:27:23 +01:00
@include media-breakpoint-down(sm) {
2015-10-31 22:00:16 +01:00
// No need for icons on very small devices
.small-box {
text-align: center;
2015-10-31 22:00:16 +01:00
.icon {
display: none;
}
2015-10-31 22:00:16 +01:00
p {
font-size: 12px;
}
}
}