News for hackers. Stuff that matters.
Re:NoJS – Creating a calculator with only HTML and CSS by chrismorgan on Friday January 21, 2022 @12:28PM (#30026784)
I’m disappointed with the reset button: it uses a dangling label inside a link, which reloads the page:

  <a href="./calc.html">
    <label for="reset">C</label>
  </a>
Rather than just using the formerly-ubiquitous but now rare beast (I think I saw exactly one last year), a reset button:

  <input type="reset" value="C">
To keep the CSS simple (!), you could even keep using the label (though ditch the <a> wrapping) and just chuck an invisible <input type=reset id=reset> in with the radio buttons, if you really want. Then the label would dangle no more.
Re:NoJS – Creating a calculator with only HTML and CSS by Garora on Friday January 21, 2022 @12:49PM (#30027126)
Hi,

Thanks for this. I did have this earlier in the development but it didnt properly work. I'll go back to this and try again