A comment like "calculate item height including inter-item spacing" would help clear up why you're not just using clientHeight here.