Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Todo app using Vite+React

@Ken-Takahashi-Q

Desktop design screenshot for the Todo app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
3intermediate
View challenge

Design comparison


SolutionDesign

Solution retrospective


Sometimes gradient in CSS does not work. I tried using linear-gradient and webkit but never work. It shows white instead. Code is in my App.css.

Community feedback

Taqibā€¢ 390

@taqh

Posted

Hello ken šŸ‘‹.

I'm assuming you're talking about the gradient background on the chekbox.

I went through your CSS and couldn't find where you tried to use it but you can try this


.check-box:checked {
   background: url('../images/icon-check.svg'),
      linear-gradient(to bottom right, hsl(192, 100%, 67%), hsl(280, 87%, 65%));
   background-repeat: no-repeat;
   background-position: center;
   outline: 0;
   transition: background 0ms;
}

I also noticed you're trying to set a gradient border to the checkbox on hover


.check-box:hover {
  border-color: var(--check-bg);
  cursor: pointer;
}

This wont work as you cant set gradients to borders. To do that you can use the border-image property however it does not work very well with a border radius. So the easiest way to achieve something close would be to do this:


.check-box:hover {
   border-top: solid .1rem hsl(192, 100%, 70%);
   border-left: solid .1rem hsl(192, 100%, 70%);
   border-right: solid .1rem hsl(280, 87%, 80%);
   border-bottom: solid .1rem hsl(280, 87%, 80%);
   outline: 0;
}

You can click here for more alternatives on setting gradient borders in css

Hope you find this helpful šŸ˜„

1

@0xabdulkhaliq

Posted

Hello there šŸ‘‹. Congratulations on successfully completing the challenge! šŸŽ‰

  • I have other recommendations regarding your code that I believe will be of great interest to you.

HTML šŸ·ļø:

  • This solution generates accessibility error reports, "All page content should be contained by landmarks" is due to non-semantic markup, which lack landmark for a webpage
  • So fix it by replacing the <div class="root"> element with the semantic element <main> in your index.html file to improve accessibility and organization of your page.
  • What is meant by landmark ?, They used to define major sections of your page instead of relying on generic elements like <div> or <span>
  • They convey the structure of your page. For example, the <main> element should include all content directly related to the page's main idea, so there should only be one per page

.

I hope you find this helpful šŸ˜„ Above all, the solution you submitted is great !

Happy coding!

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord