Open
Description
Description (*)
JavaScript functions like decorateTable()
are popular in the templates. Their purpose is to add CSS classes odd
, even
, first
, last
to HTML tables, lists, etc.
This seems wildly outdated and requires browser repainting, leading to lower Web Vitals scores. CSS3 can easily target these entities without writing classes with JavaScript after initial page load.
Note: Even when there are no actual visual changes, Chrome still reports a repaint and deducts points. These functions should not be used.