update function to either use px or unitless value