If a square wave is a sum of odd harmonic impulses, why is it continuous in the frequency domain?
As @Hilmar mentioned I think you get confused between Square wave and  Rectangular function.
In Wikipedia about Square Wave :

A square wave is a non-sinusoidal periodic waveform in which the
amplitude alternates at a steady frequency between fixed minimum and
maximum values, with the same duration at minimum and maximum.


Which its Fourier Transform is only at harmonic frequencies and its value is equal to Fourier series coefficient.
but Rectangular Function:

The rectangular functionis defined as:


which look like this:

and its Fourier Transform is a sinc function that looks like this: