Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Because you need 20x the JS to do the same thing and it’s still not hardware accelerated. These new CSS properties are well supported and will only get better.


   <span onclick="
      banana.
      classlist.
      toggle('hidden')
   ">click</span>
   <div id="banana" class="hidden">loris</div>


That's a poor example since it isn't accessible and doesn't work if a pending JS or CSS network request is preventing it from functioning.

This is the HTML version, it's not susceptible to halted execution, and it is accessible.

<details>

  <summary>Click</summary>

  loris
</details>



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: