generalized grid margin