News for hackers. Stuff that matters.
Re:HTML Tips (2020) by tylerscott on Wednesday May 05, 2021 @03:37PM (#27054624)
TIL about <meter> and wow is it interesting. Here is the spec: https://www.w3.org/TR/html52/sec-forms.html#the-meter-elemen...

I wonder what else in the HTML5 spec I've missed...

Thanks for sharing this!

Re:HTML Tips (2020) by iib on Thursday May 06, 2021 @06:19AM (#27061185)
I see that it is very similar to <progress>, and may be misused as a progress bar (which w3 actually even acknowledges and guides against). I wonder why one tag could not have sufficed.
Re:HTML Tips (2020) by runarberg on Thursday May 06, 2021 @06:36AM (#27061280)
<meter> allows you to define an optimal and a sub-optimal value, such that a full meter might be bad (or good) depending on where the value lands relative to it.

Although, one could argue that a <progress> is just a <meter> where the optimal value is 100%.

Re:HTML Tips (2020) by runarberg on Thursday May 06, 2021 @06:32AM (#27061256)
The <meter> and <progress> are pretty amazing... I only wished they would settle on a standard way to style it. And if they would allow non-linear transformations (e.g. by putting cos and sin functions in the transformation matrix so it can appear like a speedometer) that would be golden.
Re:HTML Tips (2020) by mdenic on Wednesday May 05, 2021 @05:04PM (#27055809)
Glad you enjoyed it.
Re:HTML Tips (2020) by learningwebdev on Wednesday May 05, 2021 @07:01PM (#27056963)
Hey Marko, thank you for this resource! As somebody who is teaching themselves full-stack development, it's easy to miss out on learning tips and tricks like these. This is very useful. I'm going to link to your webpage in the first ever item on my new TIL page (https://news.ycombinator.com/item?id=27017604).
Re:HTML Tips (2020) by mdenic on Thursday May 06, 2021 @01:44PM (#27066753)
Awesome! Thanks.
Re:HTML Tips (2020) by mrwww on Thursday May 06, 2021 @04:06AM (#27060371)
Great stuff Marco thanks!