The Palo Alto City Council approved a mixed-use project Monday night that offers studios and townhouses.

The council unanimously backed a plan to demolish a long-vacant building at 3877 El Camino Real that formerly housed Compadres Bar & Grill and replace it with a 4,027-square-foot commercial building and a mix of 17 two-bedroom townhouses and flats. The vote was 7-0-2; Councilwoman Lydia Kou was absent and Councilman Eric Filseth was away from council chambers when the vote was taken.

The project, by owner Zijin LLC of Saratoga, will offer two deed-restricted affordable units on site that are intended to sell for “no more than 120 percent of median county income,” according to staff.

Asked by the council why the maximum 22 housing units allowed won’t be built, architect Mark Wommack of Palo Alto-based project designer EID Architects said they would all have to be studios to reach that number.

He said the owner was interested in building two-bedroom units to fit the neighborhood and provide homes for families, and felt the project would have also been less attractive if maxed out. Each flat is just over 1,000 square feet and townhouses are about 1,288 square feet.

“You can’t get much smaller at two-bedroom units,” Wommack said, pointing out the project could have provided even fewer housing units and still have met the city’s zoning requirements. “If you would like to see more smaller units, I would strongly suggest you rewrite your zoning rules to reflect that.”

Vice Mayor Liz Kniss agreed, saying, “If they get a lot smaller, you won’t get families and I think the goal in the area is families.”

The 4,027-square-foot, three-story commercial building will contain 1,700 square feet of retail space on the ground floor and six residential flats, one of which will be priced below-market. The 11 townhouses, two stories each, will be situated in five separate buildings along the L-shaped site bounded by El Camino and Curtner Avenue, situated between a Starbucks and Nine Minute Oil & Lube. All 62 parking spaces will be provided in an underground garage.

The council added some conditions before approving the project. The project must maintain the ground floor for retail and personal service uses; the buildings must provide bird-friendly elements such as window shading; and the owner must allow further historical surveying of the old Compadres building, some of which dates back to 1938. The project wasn’t bound by the city’s retail preservation ordinance because it was submitted prior to March 2, 2015. It was submitted Nov. 20, 2014, according to staff.

The existing building is associated with Gonzalo Slivestre, a master blacksmith of ornamental iron. It was studied for possible historical listing but deemed to have no significant value. The building also suffers from a lack of physical integrity. The owner plans to place a historic plaque in the new commercial building, using small ironwork plates from the existing building.

Becky Sanders, who heads the Ventura Neighborhood Association where the project is situated, and resident Jeff Lewinsky spoke at the meeting in opposition to the project, saying it is short on affordable units and will help to drive up housing costs in the city.