set auto size ratio from with data attribute