Favorite star hover

I’m trying to achieve this kind of hover effect like in the files app.
Hover over the line, a grey star is displayed at the first column and when you click it’s getting yellow.

I think the html and css part should be fine. Is there some js involved?

Also I have a small design issue. In my css I got a

#app * {
 box-sizing: border-box;

But this is “breaking” my content view, but needed for the navigation view.
Is it possible to disable it in the content view? Looking at the files app css it’s not there.