Skip to content

Commit

Permalink
code improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
anastasiiadns committed Jan 9, 2025
1 parent b0eabc7 commit c818264
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 40 deletions.
8 changes: 4 additions & 4 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
</div>
</div>

<div class="stars">
<div class="stars stars--4">
<div class="stars__star"></div>
<div class="stars__star"></div>
<div class="stars__star"></div>
Expand All @@ -62,11 +62,11 @@
<p class="cost__price">$2,199</p>
</div>

<div
<button
class="button"
data-qa="hover"
>
<button class="button__link">BUY</button>
</div>
BUY
</button>
</body>
</html>
32 changes: 15 additions & 17 deletions src/styles/blocks/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,22 @@
margin-left: $retreat-margin-left;
margin-top: 16px;

&__link {
width: $tablet-min-width;
height: 40px;
background-color: $main-butter-color;
border: 1px solid $main-butter-color;
border-radius: 5px;
cursor: pointer;
width: $tablet-min-width;
height: 40px;
background-color: $main-butter-color;
border: 1px solid $main-butter-color;
border-radius: 5px;
cursor: pointer;

font-size: 14px;
font-weight: 700;
line-height: 16px;
text-align: center;
color: white;
font-size: 14px;
font-weight: 700;
line-height: 16px;
text-align: center;
color: white;

&:hover {
background-color: white;
color: $main-butter-color;
border: 1px solid $main-butter-color;
}
&:hover {
background-color: white;
color: $main-butter-color;
border: 1px solid $main-butter-color;
}
}
36 changes: 18 additions & 18 deletions src/styles/blocks/card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@

&__text {
margin-left: $retreat-margin-left;
}

&__text--name {
margin: 0;
padding-bottom: 4px;
padding-top: 35px;
font-size: 12px;
width: $tablet-min-width;
height: 36px;
font-weight: 500;
line-height: 18px;
}
&--name {
margin: 0;
padding-bottom: 4px;
padding-top: 35px;
font-size: 12px;
width: $tablet-min-width;
height: 36px;
font-weight: 500;
line-height: 18px;
}

&__text--description {
margin: 0;
font-size: 10px;
color: #616070;
height: 14px;
font-weight: 400;
line-height: 14px;
&--description {
margin: 0;
font-size: 10px;
color: #616070;
height: 14px;
font-weight: 400;
line-height: 14px;
}
}
}
2 changes: 1 addition & 1 deletion src/styles/blocks/stars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
padding-right: 4px;
}

&__star:nth-child(-n + 4) {
&--4 &__star:nth-child(-n + 4) {
background-image: url(../images/star-active.svg);
}

Expand Down

0 comments on commit c818264

Please sign in to comment.