Determines optimal spacing for resizable grids.