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

Pomodoro app - built using html, sass , css and js

P
Chamuā€¢ 12,970

@ChamuMutezva

Desktop design screenshot for the Pomodoro app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
4advanced
View challenge

Design comparison


SolutionDesign

Solution retrospective


A tricky challenge with the timers, i am expecting some feedbacks on bugs. Currently facing an issue with changing the background color of the checked radio buttons in the settings page. The initial styling of the code is in this css input[type="radio"]:checked+label.break__mode__ctrls. I managed to change the color of the ring. The other issue that i faced was to do with the input type=number , on mobile the incremental buttons did not appear and had to manually add them.

Community feedback

P
Graceā€¢ 27,630

@grace-snow

Posted

Hi Chamu

I recommend you rethink your styling (and some html) for the pomodoro buttons so they can be keyboard accessible. Here's what I managed to do in browser that would

  • allow keyboard focus/interaction (you *need to remove the tabindex="0" from all inputs! Very important, that)
  • let the labels control the size of the buttons, not the input which should be visually hidden but still accessible
@media screen and (min-width: 768px) {
  .break__mode__form {
    /* width: 450px; */
  }
  .break__mode--btn {
    /* width: 120px; */
    /* padding: 24px; */
  }
  input[type="radio"]:checked + label.break__mode__ctrls {
    /* line-height: 48px; */
  }
}

.break__mode__form {
  /* width: 87.2%; */
}

.break__mode--btn {
  /* width: 106px; */
  /* padding: 16px; */
  /* height: 40px; */
  /* -webkit-appearance: none; */
  /* -moz-appearance: none; */
  /* appearance: none; */
  /* border-radius: 30px; */
  border-radius: 5em;
  height: 0;
  width: 0;
  opacity: 0;
}

.break__mode__ctrls {
  /* position: absolute; */
  /* left: 10px; */
  /* top: 16px; */
}

label {
  height: 100%;
  padding: 1em 1.25em;
  border-radius: 30px;
}

.pomodoro__ctrls {
  display: flex;
  align-items: center;
  justify-content: center;
}

input[type="radio"]:checked + label.break__mode__ctrls {
  /* place-content: center; */
  /* top: 3px; */
  /* text-align: center; */
  /* line-height: 40px; */
}

// NOTE you may prefer to use the :focus-visible pseudo instead
input[type="radio"]:focus ~ label {
  outline: 3px solid paleturquoise;
}

I hope this makes sense as you go through and apply these in browser. Try to use your keyboard as you go and it should make sense

It would be nicer with the focus state to use a border rather than outline on the label tbh, then you could have the nice curved radius. Give the labels all a transparent border as their base style, then add a color to that border on focus. Make it obvious for keyboard / assistive tech users where they are on your page.

I can't help with the other radio question you raise as I'm not sure what the design is meant to look like. (And I need to go make my dinner :)

Best of luck with it, it's looking really nice!

3

P
Chamuā€¢ 12,970

@ChamuMutezva

Posted

@Gracesnow, thank you for the insights. Yes, making the labels control the size of the buttons is understandable. I got it mixed up when I positioned the labels with with absolute, didn't think of the trick you mentioned above of setting the width and height of .break__mode--btn to 0. Thank you

0
P
Emmilie Estabilloā€¢ 5,540

@emestabillo

Posted

Hi Chamu, I agree, the project looks really nice! For the incremental buttons on mobile, it seems they are not there by default. I read about it here. There's a can-i-use link included in the article which has a bunch of useful information.

1

P
Chamuā€¢ 12,970

@ChamuMutezva

Posted

@emestabillo, Thanks Em, the explanation in the article was clear to the question I had.

1

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