To regulate and determine the area of yards, courts, and other open spaces in connection with buildings hereafter erected or altered, and, for these purposes, to divide the city into districts, of such number, shape, and area as it may deem best suited to the purposes: Provided, That said regulations and determinations shall be uniform for each class or grade of buildings throughout each district, and that the regulations in one or more districts may differ from those of other districts.
53 P.S. § 30657