add support for fontawesome svg icons (#2920)

* add support for fontawesome svg icons
* bump bundlewatch sizes
This commit is contained in:
REJack 2020-07-24 17:59:40 +02:00 committed by GitHub
parent 240836922c
commit 949f91985f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 56 additions and 17 deletions

View file

@ -6,7 +6,7 @@
}, },
{ {
"path": "./dist/css/adminlte.min.css", "path": "./dist/css/adminlte.min.css",
"maxSize": "72.5 kB" "maxSize": "74 kB"
}, },
{ {
"path": "./dist/css/alt/adminlte.components.css", "path": "./dist/css/alt/adminlte.components.css",

View file

@ -76,11 +76,16 @@
> .fab, > .fab,
> .fal, > .fal,
> .fad, > .fad,
> .svg-inline--fa,
> .ion { > .ion {
display: block; display: block;
font-size: 20px; font-size: 20px;
} }
> .svg-inline--fa {
margin: 0 auto;
}
&:hover { &:hover {
background-color: $button-default-background-color; background-color: $button-default-background-color;
border-color: darken($button-default-border-color, 20%); border-color: darken($button-default-border-color, 20%);

View file

@ -418,6 +418,7 @@ html.maximized-card {
> .fab, > .fab,
> .fal, > .fal,
> .fad, > .fad,
> .svg-inline--fa,
> .ion { > .ion {
cursor: pointer; cursor: pointer;
margin-right: 5px; margin-right: 5px;

View file

@ -2,10 +2,12 @@
// Component: Carousel // Component: Carousel
// //
.carousel-control { .carousel-control-custom-icon {
&.left, .carousel-control-prev & {
&.right { margin-left: -20px;
background-image: none; }
.carousel-control-next & {
margin-right: 20px;
} }
> .fa, > .fa,
@ -14,6 +16,7 @@
> .fab, > .fab,
> .fal, > .fal,
> .fad, > .fad,
> .svg-inline--fa,
> .ion { > .ion {
display: inline-block; display: inline-block;
font-size: 40px; font-size: 40px;

View file

@ -42,6 +42,7 @@
&.fab, &.fab,
&.fal, &.fal,
&.fad, &.fad,
&.svg-inline--fa,
&.ion { &.ion {
line-height: $input-height; line-height: $input-height;
} }
@ -55,6 +56,7 @@
&.fab, &.fab,
&.fal, &.fal,
&.fad, &.fad,
&.svg-inline--fa,
&.ion { &.ion {
line-height: $input-height-lg; line-height: $input-height-lg;
} }
@ -68,6 +70,7 @@
&.fab, &.fab,
&.fal, &.fal,
&.fad, &.fad,
&.svg-inline--fa,
&.ion { &.ion {
line-height: $input-height-lg; line-height: $input-height-lg;
} }
@ -82,6 +85,7 @@
&.fab, &.fab,
&.fal, &.fal,
&.fad, &.fad,
&.svg-inline--fa,
&.ion { &.ion {
line-height: $input-height-sm; line-height: $input-height-sm;
} }
@ -95,6 +99,7 @@
&.fab, &.fab,
&.fal, &.fal,
&.fad, &.fad,
&.svg-inline--fa,
&.ion { &.ion {
line-height: $input-height-sm; line-height: $input-height-sm;
} }

View file

@ -23,6 +23,7 @@
> .fab, > .fab,
> .fal, > .fal,
> .fad, > .fad,
> .svg-inline--fa,
> .ion { > .ion {
font-size: $font-size-sm; font-size: $font-size-sm;
} }

View file

@ -126,6 +126,7 @@
&.fab, &.fab,
&.fal, &.fal,
&.fad, &.fad,
&.svg-inline--fa,
&.ion { &.ion {
font-size: 1.1rem; font-size: 1.1rem;
} }

View file

@ -270,6 +270,7 @@
> .fab, > .fab,
> .fal, > .fal,
> .fad, > .fad,
> .svg-inline--fa,
> .ion { > .ion {
color: $gray-800; color: $gray-800;
} }
@ -283,6 +284,7 @@
> .fab, > .fab,
> .fal, > .fal,
> .fad, > .fad,
> .svg-inline--fa,
> .ion { > .ion {
color: $gray-400; color: $gray-400;
} }

View file

@ -115,6 +115,13 @@
} }
} }
svg {
font-size: 70px;
position: absolute;
right: 15px;
top: 15px;
transition: transform $transition-speed linear;
}
} }
// Small box hover state // Small box hover state
@ -122,7 +129,8 @@
text-decoration: none; text-decoration: none;
// Animate icons on small box hover // Animate icons on small box hover
.icon > i { .icon {
> i {
&, &,
&.fa, &.fa,
&.fas, &.fas,
@ -134,6 +142,10 @@
transform: scale(1.1); transform: scale(1.1);
} }
} }
> svg {
transform: scale(1.1);
}
}
} }
} }

View file

@ -90,10 +90,11 @@
> .fab, > .fab,
> .fal, > .fal,
> .fad, > .fad,
> .svg-inline--fa,
> .ion { > .ion {
background-color: $gray-500; background-color: $gray-500;
border-radius: 50%; border-radius: 50%;
font-size: 15px; font-size: 16px;
height: 30px; height: 30px;
left: 18px; left: 18px;
line-height: 30px; line-height: 30px;
@ -102,6 +103,9 @@
top: 0; top: 0;
width: 30px; width: 30px;
} }
> .svg-inline--fa {
padding: 7px;
}
} }
// Time label // Time label
> .time-label { > .time-label {

View file

@ -103,6 +103,7 @@
.fab, .fab,
.fal, .fal,
.fad, .fad,
.svg-inline--fa,
.ion { .ion {
transition: transform linear .3s; transition: transform linear .3s;

View file

@ -1447,11 +1447,15 @@
</div> </div>
</div> </div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev"> <a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span> <span class="carousel-control-custom-icon" aria-hidden="true">
<i class="fas fa-chevron-left"></i>
</span>
<span class="sr-only">Previous</span> <span class="sr-only">Previous</span>
</a> </a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next"> <a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span> <span class="carousel-control-custom-icon" aria-hidden="true">
<i class="fas fa-chevron-right"></i>
</span>
<span class="sr-only">Next</span> <span class="sr-only">Next</span>
</a> </a>
</div> </div>