Yes - I did add class styles when more than one object was affected, but for the single rectangles, I just added through d3.