Vending machines in Montgomery County government buildings will have to offer healthy snacks and drinks, under a bill passed Tuesday by the county council.

The council voted unanimously to require that beginning in July, 50 percent of items sold in about 170 machines stocked by companies with county contracts meet American Heart Association standards.

That means 35 percent or fewer calories from fat or sugar. It also calls for items with no more than 200 calories per package, less than 0.5 grams of trans fat and no more than 200 milligrams of sodium. Beverages must be less than 250 calories or no more than 20 fluid ounces.

In July 2018, 65 percent of all vending items will be covered by the law.

The measure was sponsored by Council member George L. Leventhal (D-At Large).