Because by default the <body>
doesn't scroll, <html>
does.
Change the selector to :root
and it will work in Chrome.
Though to be safe you'd be better defining your own scrolling area since older browsers were indeed using <body>
as scrollingElement
.