I am working on an element that becomes sticky on top of the page once you scroll past. In order to prevent content below it from shifting up, am getting the current height of the parent of the element that's about to be made sticky and adding it as inline style purely for user experience so the user isn't disorientated by things jumping around.
I am wondering if this has added benefit for performance? Does the mere fact of changing element's position cause page reflow or have I prevented page reflow by applying fixed height to the element parent before making the child element sticky?