In Star Wars: Rogue One, the rebel fleet arrives at Scarif, sends some fighters through the gate before it can be closed, and commence battle with the Imperial Fleet there.
I never saw either the Imperial nor Rebel capital ships opening fire with their large guns - instead it was a battle fought with only fighters, and one stage a larger pusher.
Why not?