Live data from Hacker News

NoJS – Creating a calculator with only HTML and CSS

blog.scottlogic.com

31–40 of 48 posts

Re: NoJS – Creating a calculator with only HTML and CSS

#31

Earlier quoted context omitted.

? It doesn’t even allow non-integer numbers.

It does not work in Firefox: https://github.com/QuarkNerd/noJS . It's not clear why though.

Firefox doesnt support @property Which is what I'm using to round down and calculate the decimals

Re: NoJS – Creating a calculator with only HTML and CSS

#34
post #8

Earlier quoted context omitted.

There's a link to the calculator in the first paragraph.

sadly, it has rounding errors if you multiply by 0.xxx

Hi,

Please could you give me the exact input, wrong answer and also browser?

Thank you:)

Re: NoJS – Creating a calculator with only HTML and CSS

#35

I’m disappointed with the reset button: it uses a dangling label inside a link, which reloads the page: C Rather than just using the formerly-ubiquitous but now rare beast (I think I saw exactly one last year), a reset button: To keep the CSS simple (!), you could even keep using the label (though ditch the wrapping) and just chuck an invisible in with the radio buttons, if you really want. Then the label would dangl…

[deleted]

Re: NoJS – Creating a calculator with only HTML and CSS

#36
post #34

Earlier quoted context omitted.

sadly, it has rounding errors if you multiply by 0.xxx

Hi, Please could you give me the exact input, wrong answer and also browser? Thank you:)

In Safari 15.2, everything is rounded down. 1/2 = 0, 8/9 = 0.

Also, it's not possible to type decimal numbers and have them displayed, although it appears they are actually being used internally. Initially, the "." button is disabled. If you press 0, then the "." button is enabled, disappears when clicked (good up to here), but then clicking any of the numbers don't change the display. So, typing "0.9 + 0.9" will look like "0 + 0" and will equal 1 (which is 1.8, rounded down). Also, if you click enough numbers, the numbers are disabled (as usual). So, the displayed state isn't matching the internal state, it appears.

Re: NoJS – Creating a calculator with only HTML and CSS

#38
post #18

Earlier quoted context omitted.

But then you need an active server.

how else do you serve an html page?

From a CDN. By "active" I meant like, a server that does stuff other than serve content, that processes pages.
Post reply on HN