Deductions & credits

It does not matter.  Capital losses are first applied to similar gains (e.g. long term to long term) and anything left over is applied to the other (e.g. long term losses to short term gains).