Loosely simulates behaviour of position sticky known from CSS