If a 8x8 trough is mounted under a panel or disconnect that is less than 8" deep is this a violation? Code Ref?

Thanks.