A customer wants to install recessed lighting in an insulated attic, the lights they want to install are match the others in the rest of the house. The problem is they are magnetic halogen lights and the IC boxes that are supplied to house these lights and transformer are very large and do not fit the joist cavity in the desired area.

My question is if we were to use smaller IC boxes that will fit the space then install the can in the box then supply the 12 volts from a seperate transformer outside the box and insulation would this be a code violation.
I know this is a modification and I think I already know the answer but thought I would get some other input. I'm sure the reason the original IC boxes are so large (12" X 17") is to accommidate the heat from the transformer, so hence my question.
I