@miroslavdurin
Posted
Hello and congratulations on completing this solution.
I would suggest that you add a class .scroll
if a list is longer than 9, or whatever number you like.
You can change container div inside of ToDoList.js
to something like this:
<div className={`container ${theme?"dark-theme":"light-theme"} ${list.length >= 9 && "scroll"}`}
Inside Main.scss
you can change to this:
.container {
@media (max-width:$mobile-width){
margin-top: 20px;
}
margin-top: 50px;
max-height: 500px; /* You can put any height you like */
/* This class is added if list.length is bigger than 9 */
&.scroll {
overflow-y: scroll;
}
/* Custom Scrollbar styles */
&::-webkit-scrollbar {
width: 10px;
cursor: pointer;
}
/* Track */
&::-webkit-scrollbar-track {
box-shadow: inset 0 0 5px grey;
border-radius: 10px;
}
/* Handle */
&::-webkit-scrollbar-thumb {
background: var(--light-grayishblue-hover);
border-radius: 10px;
}
/* Handle on hover */
&::-webkit-scrollbar-thumb:hover {
background: var(--dark-grayishblue);
}
}
I've added some styles for a scroll-bar too.
There is also issue with a check mark, which is not centered. I think that inside of
.todo-box img
you can remove these 2 lines:
right:2px;
top:5px;
And I've noticed that on a screen bigger than 1450px background-image is not full width. You can just add background-size: contain
inside of .App
class.
Marked as helpful
@docuong0912
Posted
@miroslavdurin that's a great idea, really detail explaination, i will give it a try, thank you for your time and effort