Responsive stylized icons

This commit is contained in:
kitajchuk
2021-03-31 09:30:17 -07:00
parent 3c34a5cdd9
commit 46fd6fc057
3 changed files with 23 additions and 5 deletions

View File

@@ -1,17 +1,27 @@
.icon {
display: inline-block;
background-color: $jambonz;
width: 48px;
height: 48px;
width: $icon-size-1;
height: $icon-size-1;
border-radius: 24px;
position: relative;
@media (max-width: $width-mobile) {
width: $icon-size-2;
height: $icon-size-2;
}
svg {
stroke: $white;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
@media (max-width: $width-mobile) {
width: 18px;
height: 18px;
}
}
&--pill {
@@ -39,9 +49,9 @@
}
.icons {
margin: 0 -16px;
margin: 0 -1.1111111111vw;
.icon {
margin: 0 16px;
margin: 0 1.1111111111vw;
}
}

View File

@@ -37,15 +37,17 @@ a:not(.btn) {
svg {
@media (max-width: $width-tablet-1) {
width: 20px;
height: auto;
height: 20px;
}
@media (max-width: $width-tablet-2) {
width: 18px;
height: 18px;
}
@media (max-width: $width-mobile) {
width: 16px;
height: 16px;
}
}
}

View File

@@ -25,6 +25,12 @@ $m-size: 16px;
$ms-size: 14px;
$mxs-size: 12px;
/******************************************************************************
* Icon sizes
*******************************************************************************/
$icon-size-1: 48px;
$icon-size-2: 40px;
/******************************************************************************
* Sizes
*******************************************************************************/