A girl in a red and white uniform is swinging a bat.
A girl in uniform is swinging.
A girl is swinging a bat.
In uniform is a rephrasing of in a red and white uniform.
A girl in (a red and white) uniform swinging is part of her total description swinging a bat.