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

Interestingly, the default <marquee> doesn’t appear as smooth as a CSS animation would be?

Playing with the scroll speed makes it feel smoother:

  <marquee scrolldelay="50" truespeed>scroll faster than default</marquee>


They weren’t smooth back then by default either.


In Chromium it's quite literally a CSS animation: https://source.chromium.org/chromium/chromium/src/+/main:thi...

All the code in that file is a fun read. <marquee> was rewritten as if it was a web component using the public DOM APIs (ex. It uses CSS animations and requestAnimationFrame).


I’m pretty sure that originally it was to reduce CPU load, and later was left that way for backwards compatibility.




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

Search: