Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Frontend practice with catalog page and hovers
Replace `<your_account>` with your Github username and copy the links to Pull Request description:
- [DEMO LINK](https://<your_account>.github.io/layout_catalog_hovers/)
- [DEMO LINK](https://Kacper-Leman.github.io/layout_catalog_hovers/)

> Follow [this instructions](https://github.com/mate-academy/layout_task-guideline#how-to-solve-the-layout-tasks-on-github)

Expand Down
8 changes: 8 additions & 0 deletions src/styles/blocks/catalog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,16 @@
border-radius: 5px;
margin-bottom: 48px;

transition: color $delayValue, transform $delayValue;

&:not(:nth-child(4n)) {
margin-right: 48px;
}
}

&__card:hover {
transform: scale(1.2);

color: #34568b;
}
}
5 changes: 5 additions & 0 deletions src/styles/blocks/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,9 @@
font-size: 12px;
font-weight: 500;
}

&__link:hover {
transition: color $delayValue;
color: #00acdc;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put transition to origin element not hover to make animation smooth in both directions:

Suggested change
&__link:hover {
transition: color $delayValue;
color: #00acdc;
}
&__link {
transition: color $delayValue;
}

}
1 change: 1 addition & 0 deletions src/styles/main.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import "./utils/variables";
@import "blocks/page";
@import "blocks/header";
@import "blocks/catalog";
1 change: 1 addition & 0 deletions src/styles/utils/_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$delayValue: 300ms;