Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

When San Francisco’s Board of Supervisors voted on a law that expanded the city’s existing ban on the use of foam food containers, it dealt a blow to some things summer barbecue guests and beachgoers in the rest of the country take for granted.

Kids’ swim aids like foam kickboards? Gone. Those lightweight coolers that make it easy to bring drinks and snacks to a picnic or potluck? Nope. Even more utilitarian items like polystyrene dock floats and buoys will be illegal to sell in the city beginning in 2017.

Summer fun-seekers will still be able to buy these items elsewhere, of course, but lawmakers hope that the ban will keep people from using these products entirely.

Read More: Hugs, the Secret Weapon of San Francisco's Homeless Czar

“This ordinance is one of the strongest in the country protecting both the environment and public health,” Guillermo Rodriguez, spokesman for San Francisco's Department of the Environment, told NBC Bay Area.

Although it is lightweight, cheap and buoyant, polystyrene also crumbles, and it doesn’t biodegrade. This is a bad combination for the environmental health of the Bay, said Conor Johnston, chief of staff for board president London Breed.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

“It’s really something you don’t want to have around a body of water,” Johnston said. The discarded foam items and the chemicals in them pose a hazard to the aquatic ecosystem, he said. “There’s no need for us to be selling them here.”

Earlier legislation, set in place back in 2007, banned the use of foam food containers in San Francisco, and other cities, including New York, have similarly outlawed foam items like takeout “clamshells” and coffee cups. San Francisco’s new law goes further by banning the sale of those products, the sale of food in foam trays, egg cartons and similar packaging, as well as the use and sale of non-food items like those pool toys and packing peanuts.

“We just passed the toughest anti-Styrofoam law in the country,” Breed said in a statement provided to reporters. “San Francisco is on our way to leading the country on environmental policy.”

(Although the rule frequently has been referred to as a “styrofoam ban,” Styrofoam is actually a trademarked term for a line of craft and commercial foam products made by Dow Chemical Company.)

The ban on meat and fish trays made of foam kicks in on July 1, 2017; the remainder of the ban goes into effect next January 1. Penalties for violating the ban start at $100 and climb to $500 after three or more violations.

The rule will get a second reading on July 12, although this is mostly a formality given that the 11-member Board voted in favor of the ban unanimously this week.

Read More: Philadelphia Tries for a More Palatable Soda-Tax Pitch

Predictably, the response on social media was divided. Most comments on NBC Bay Area’s Facebook page were in favor of the ban. “Awesome. It's not the 80s, this should have happened ages ago,” one user wrote.

“This is very much needed, and I'm so glad they they extended the ban to such a degree!” another said.

But the measure also drew its share of detractors, who posted complaints about rising costs and nanny-state overreach. “It already costs an arm and a leg for food in the city now their gona tac [sic] a couple more bucks on for packaging!” one Facebook user wrote.

Consumers will experience a certain amount of inconvenience because of the ban’s inclusion of recreation-oriented objects, including coolers, said Jeff Lenard, spokesman for NACS, the National Association of Convenience Stores.

Read More: Ban the Bag? Why Plastic Bag Taxes and Bans Don't Always Work

“From our perspective, it takes away a bit of the customer convenience of being able to get something when you need it without preplanning,” he said, adding that this weekend is one of the year’s busiest for ice and cold beverage sales at convenience stores.

That means this time next year, San Francisco shoppers won’t be able to make a single stop for ice, drinks and a cooler within city limits.

“It makes it less convenient for customers, but if that’s the law, you comply,” Lenard said.