portfolio/assets/styles/components/technologies.scss

132 lines
2.4 KiB
SCSS
Raw Normal View History

2022-06-21 10:33:35 +00:00
@use "sass:math";
.tech-mosaic {
2022-07-14 08:04:14 +00:00
border-radius: 3px;
2022-06-21 10:33:35 +00:00
display: flex;
flex-wrap: wrap;
overflow: hidden;
2022-06-21 10:33:35 +00:00
.item {
position: relative;
box-sizing: border-box;
background-color: rgba(231, 231, 231, 0.425);
flex-basis: percentage(math.div(1, 8));
}
.item::before {
content: '';
display: block;
padding-top: 100%;
}
.item .item-inside {
position: absolute;
top: 0; left: 0;
height: 100%;
width: 100%;
}
.item-bg {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
img {
width: 100%;
}
padding: 2em;
2022-06-21 10:33:35 +00:00
}
.item-bg img.img-stretch {
width: auto;
height: 100%;
}
.item-content {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
color: white;
display: flex;
justify-content: center;
align-items: center;
opacity: 1;
background-color: rgba(95, 196, 99, 0.46);
transition: all 0.2s;
}
.item-content > div {
opacity: 0;
font-size: 1.1em;
text-align: center;
padding: .5em;
line-height: 1.5em;
max-width: 100%;
}
.item:hover .item-content {
background-color: rgba(0, 0, 0, 0);
}
}
.tech-mosaic-btn-container {
position: absolute;
bottom: 0;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
margin-top: 1em;
.btn {
margin-bottom: 1em;
}
}
.tech-mosaic-container {
position: relative;
&.opened .tech-mosaic-btn-container {
display: none;
}
&.closed .tech-mosaic-btn-container {
@include scrimGradient(white, 0deg);
height: 11em;
}
&.closed .tech-mosaic {
max-height: 20em;
}
}
@media (min-width: 400px) {
.item-bg {
padding: 1em !important;
}
}
@media (max-width: 1000px) {
2022-06-21 10:33:35 +00:00
.tech-mosaic {
.item {
flex-basis: percentage(math.div(1, 5));
}
}
}
@media (max-width: 800px) {
2022-06-21 10:33:35 +00:00
.tech-mosaic {
.item {
flex-basis: percentage(math.div(1, 4));
2022-06-21 10:33:35 +00:00
}
}
}
@media (max-width: 400px) {
2022-06-21 10:33:35 +00:00
.tech-mosaic {
.item {
flex-basis: percentage(math.div(1, 2));
}
}
}