examples explain better:
the size of a linear gradient can be descided in two ways: one if we decide the gradient that i want then use background-size peoperty and then use background-repeat: if i want to repeat it just like when i use repeating-linear-gradient() function or simply i size it to any size desired.two if i descide it using color-stops.that is color-stop positions will descide how big the gradient size will be then i should either end the gradient with transparent color-stop so that i can stop the spreading over the gradient line that keeps going until the end of the gradient line and have only one slice of gradient or use repeating-linear-gradient(); if i want the gradient to be repeated over the background).
the size of the radial gradient when descided in the gradient function radial-gradient();will only calculate the size of the ending shape which in turn calculating the gradient ray length.
now the radial gradient can be sized just like any normal background-image using background-size,this is quite different than calculating the size of the ending shape inside the radial-function,here, we are only calculating the size of the background that the gradient as a (background image) will take from the element's total background size..