внесла изменения в css карточек, добавила тень под текст и исправила отступы

This commit is contained in:
xomimishka committed 2025-04-18 12:13:33 +03:00
1 parent 6f10fd78af
commit 09b86c530a
2 files changed
+93 -47

No files matched your search

+92 -46
View File
@@ -10,84 +10,141 @@
border: 1px solid transparent;
color: $text-secondary;
.image {
position: absolute;
width: 100%;
height: 100%;
object-fit: cover;
transition: filter 0.3s ease;
pointer-events: none;
z-index: 0;
}
.content {
position: absolute;
bottom: 10px;
left: 20px;
right: 20px;
bottom: -10px;
left: 0;
padding: 0 30px;
z-index: 2;
transition: bottom 0.3s ease;
}
&::before {
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 60%;
background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
z-index: 1;
pointer-events: none;
}
.description {
max-height: 0;
opacity: 0;
transition: max-height 0.3s ease, opacity 0.3s ease;
margin: 0;
overflow: hidden;
transition: max-height 0.3s ease, opacity 0.3s ease;
}
.link {
opacity: 0;
transition: opacity 0.3s ease;
transform: translateY(10px);
transition: opacity 0.3s ease, transform 0.3s ease;
}
&:hover {
.image {
filter: brightness(0.7);
}
.content {
bottom: 20px;
}
.description {
max-height: 200px;
opacity: 1;
margin-top: 10px;
}
.link {
opacity: 1;
transform: translateY(0);
}
.image {
filter: brightness(0.7);
}
.content {
bottom: 20px;
}
}
}
&__news {
height: 250px;
position: relative;
.image {
position: absolute;
width: 100%;
height: 100%;
object-fit: cover;
transition: filter 0.3s ease;
pointer-events: none;
z-index: 0;
}
.content {
position: absolute;
bottom: 0;
left: 0;
right: 0;
padding: 12px 16px;
padding: 20px 20px;
color: white;
z-index: 2;
}
&::before {
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 40%;
background: linear-gradient(
to top,
rgba(0, 0, 0, 0.6),
rgba(0, 0, 0, 0)
);
z-index: -1;
}
&::before {
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 60%;
background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
z-index: 1;
pointer-events: none;
}
}
&__project {
height: 250px;
position: relative;
.image {
position: absolute;
width: 100%;
height: 100%;
object-fit: cover;
transition: filter 0.3s ease;
pointer-events: none;
z-index: 0;
}
.content {
position: absolute;
left: 11px;
bottom: 0;
padding: clamp(12px, 3vw, 22px) clamp(6px, 1.5vw, 16px);
padding: 20px 20px;
color: $text-card-project;
z-index: 2;
}
&::before {
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 60%;
background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
z-index: 1;
pointer-events: none;
}
}
}
@@ -99,10 +156,11 @@
object-fit: cover;
transition: filter 0.3s ease;
pointer-events: none;
z-index: 0;
}
.title {
margin: 0 0 12px;
font-size: clamp(1.25rem, 1.0011rem + 0.5199vw, 1.625rem);
font-weight: 600;
}
@@ -136,39 +194,27 @@
}
}
}
.card__lab {
&:hover {
.title {
font-size: 20px;
@include mediaMax($mobile-max-widthGosBlock) {
font-size: 16px;
}
}
}
}
.title {
font-size: 22px;
@include mediaMax($mobile-max-widthGosBlock) {
font-size: 20px;
}
}
.description {
p {
font-size: 16px;
line-height: 26px;
@include mediaMax($mobile-max-widthGosBlock) {
font-size: 15px;
line-height: 22px;
}
}
}
.link {
font-size: 18px;
@include mediaMax($mobile-max-widthGosBlock) {
font-size: 16px;
}
}
}