From 85afdedaad4d2b3d95352b65ccf665c03baf7a8e Mon Sep 17 00:00:00 2001 From: Artem Bazhenov Date: Mon, 5 Apr 2021 16:56:42 +0300 Subject: [PATCH 1/2] solution --- src/styles/block/card.scss | 15 +++++++++++++-- src/styles/block/nav.scss | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/styles/block/card.scss b/src/styles/block/card.scss index 850b3f5c53..a0073925c0 100644 --- a/src/styles/block/card.scss +++ b/src/styles/block/card.scss @@ -6,13 +6,23 @@ border-radius: 5px; &__img { - margin: 29px 19px 0; + margin: 29px 19px 45px; width: 160px; height: 134px; + transition-duration: 0.4s; + transition-property: margin, padding, width, height; + } + + &__img:hover { + margin: 0 0 37px; + padding: 8px 6px; + width: 100%; + height: 100%; + outline: 3px solid #f3f3f3; } &__name { - margin: 45px 0 0 14px; + margin: 0 0 0 14px; font-weight: 500; font-size: 12px; line-height: 15px; @@ -65,6 +75,7 @@ background-color: $light-blue-color; border: 1px solid $light-blue-color; border-radius: 5px; + transition-duration: 0.4s; } &__buy:hover { diff --git a/src/styles/block/nav.scss b/src/styles/block/nav.scss index 388bd5f16a..4655c2bdfa 100644 --- a/src/styles/block/nav.scss +++ b/src/styles/block/nav.scss @@ -25,6 +25,7 @@ text-transform: uppercase; text-decoration: none; color: #000; + transition-duration: 0.4s; } &__link:hover { From c0f2b06398fc0d908a691cf10ff4a48b07b48a14 Mon Sep 17 00:00:00 2001 From: Artem Bazhenov Date: Tue, 6 Apr 2021 14:32:10 +0300 Subject: [PATCH 2/2] solution --- src/styles/block/card.scss | 8 +++----- src/styles/block/nav.scss | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/styles/block/card.scss b/src/styles/block/card.scss index a0073925c0..397b6344a3 100644 --- a/src/styles/block/card.scss +++ b/src/styles/block/card.scss @@ -10,14 +10,11 @@ width: 160px; height: 134px; transition-duration: 0.4s; - transition-property: margin, padding, width, height; + transition-property: transform; } &__img:hover { - margin: 0 0 37px; - padding: 8px 6px; - width: 100%; - height: 100%; + transform: scale(1.2); outline: 3px solid #f3f3f3; } @@ -76,6 +73,7 @@ border: 1px solid $light-blue-color; border-radius: 5px; transition-duration: 0.4s; + transition-property: all; } &__buy:hover { diff --git a/src/styles/block/nav.scss b/src/styles/block/nav.scss index 4655c2bdfa..a51dae8bf4 100644 --- a/src/styles/block/nav.scss +++ b/src/styles/block/nav.scss @@ -26,6 +26,7 @@ text-decoration: none; color: #000; transition-duration: 0.4s; + transition-property: all; } &__link:hover {