I have recently observed 3%, 7% and 10% overshoots on a 40 pS rise time square wave on some $20K 1 GHz scopes.
The rigorous answer to your question can be obtained with Octave.
Create one cycle of a square wave:
a=[ones(1,1000000),zeros(1,100000)];
A=fft(a);
plot(abs(A));
Then zoom in on the spikes. That's the amplitude of an infinitely short rise time. If you take the period as 1 second, then the spikes are at 1, 3, 5, 7, 9... Hz. And the resolution bandwidth of the plot is 0.000001 Hz.
Now substitute a ramp for the leading and trailing edge. That will get fiddly to avoid introducing even harmonics. The FFT is defined on the semi-closed interval from -pi to pi or -1 to 1. The maximum frequency in the plot is the center. LHS is the positive frequencies, RHS is the negative frequencies.
QED
Edit: The 0 to 100% ramp is a convolution with a short rectangular pulse. So the spectrum of the square wave gets multiplied in frequency by a sinc(f) function. The wider the pulse, the narrower the sinc(f) function. I'll let you look up the relationship between the period T and the zeros of sinc(f). I *should* be able to remember it, but after 30 years I still feel obliged to look it up if I'm actually doing something. But I do the same with the quadratic equation.