Skip to content

Commit

Permalink
add task solution
Browse files Browse the repository at this point in the history
  • Loading branch information
ihnatd committed Dec 26, 2024
1 parent 6551aaa commit 4f3b150
Showing 1 changed file with 25 additions and 21 deletions.
46 changes: 25 additions & 21 deletions src/styles/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* Глобальные настройки */
* {
margin: 0;
padding: 0;
Expand All @@ -9,6 +10,7 @@ body {
background-color: #f9f9f9;
}

/* Карточки продуктов */
.product-cards {
display: flex;
justify-content: center;
Expand All @@ -22,7 +24,7 @@ body {

&[data-qa='card'] {
border-color: #007bff;
animation: highlight 0.5s ease;
animation: highlight 0.5s ease; /* Анимация, которая отключается в тестах */
}
}

Expand Down Expand Up @@ -53,31 +55,33 @@ body {
border-radius: 4px;
font-weight: 700;
transition: background-color 0.3s;
&:hover {
background-color: #0056b3;
}
}

&__rating {
display: flex;
justify-content: center;
margin: 10px 0;
border: 1px solid #ccc;
border-radius: 8px;
background-color: #fff;
text-align: center;
padding: 16px;

.product-cards__rating {
display: flex;
justify-content: center;
margin: 10px 0;
border: 1px solid #ccc;
border-radius: 8px;
background-color: #fff;
text-align: center;
padding: 16px;
.star {
width: 20px;
height: 20px;
background-image: url('../images/star-active.svg');
background-size: cover;
margin: 0 2px;
cursor: pointer;

.star {
width: 20px;
height: 20px;
background-image: url('../images/star-active.svg');
background-size: cover;
margin: 0 2px;
cursor: pointer;
&:hover,
&:hover ~ .star {
background-image: url('../images/star.svg');
&:hover,
&:hover ~ .star {
background-image: url('../images/star.svg');
}
}
}
}

0 comments on commit 4f3b150

Please sign in to comment.