At the same time, the city has banned the use of another plastic item: the drinking straw. The law’s supporters say it will prevent a million straws a day from washing into the San Francisco Bay.

“Napkins, straws, and bags are available upon request,” reads a footnote on the menu of the Sentinel, a walk-up sandwich shop in the city’s thriving financial district. “You can still get needles for free though. Welcome to SF.”

AD

AD

The streets of San Francisco — hilly, curvy, cinematic and, in recent years, a bleak showcase for the mentally ill and economically displaced — have long reflected this eccentric city’s governing priorities and many civic contradictions.

Some are easy to make fun of, the utopian fantasies of a place famous for pursuing its own artisanal world view.

But a new mayor has taken office. She is, at least for the moment, trading San Francisco’s liberal-laboratory style of local government for a practical, down-and-very-dirty approach that is reflected in what she said she wants as her legacy.

“I want people to walk around this city and think, ‘Wow, it’s so clean here,’ ” Mayor London Breed said during a recent interview. “I want people just hanging out in front of where they live and enjoying the weather, people of all races, able to live in dignity because they have a home and are able to make ends meet.”

AD

AD

Simple and hugely complex.

Breed is the first African American woman to run San Francisco, emerging from a close election in June that was largely about how the city is changing and what should be done to preserve its character.

In recent years, that question has centered on an expanding tech industry, an economic bonanza that most cities would simply celebrate. But the investment and jobs have come with rising housing costs, rapid neighborhood redevelopment and an exodus of longtime residents, including those from her own black community.

The shifts have made the city, once a cradle of counterculture and now a mecca of the mainstream economy, among the most exciting and puzzling in the nation.

AD

It is a magnet for young tech talent and a public venue for despair, a place with the lowest percentage of children of any major American city that can spend weeks debating the pricing for permits to test on-street delivery robots. It spends more than a quarter-billion dollars a year on issues surrounding its 7,500 homeless — and has the third most billionaires of any city in the world.

AD

All of this can be seen on its famous streets.

In January, United Nations special rapporteur Leilani Farha walked them, comparing some of the conditions she saw there with poverty in Mumbai. This in a city where the median household income for home buyers is now $303,000 a year, a historic high.

AD

“You begin to wonder about all the tax dollars and whether they are being spent in the right way,” said Jeffrey Ouyang, a 10-year city resident who works for the tech start-up Zumper, a real estate search site.

Ouyang, 33, said he believes poverty and homelessness have gotten progressively worse despite the city’s rising tax base.

“You begin to think about impact,” he said, “and whether we have any of it right.”

Inside-outside problem

None of this is a mystery to Breed, who was raised in San Francisco’s public education and housing systems. A former county supervisor, Breed said she is growing into the snap-to power that comes with the mayor’s office, saying the promotion helps getting the simple things done quickly.

AD

AD

Among Breed’s first decisions was to deploy a five-person Public Works crew to do nothing but clean the streets of human feces — it was, in fact, dubbed the “poop patrol” — as the city has received more than 14,000 reports about human waste this year alone.

This is the near-term problem, Breed said, while the plastic-straw ban looks further ahead. As she put it, “You can walk and chew gum at the same time.”

“There are things that matter now, and there are things that matter for the future of our planet and the next generation of people growing up in this city,” she said. “We can’t just think about what we need to do now.”

Even those “now” items take time in a city as expensive as this one.

For instance, Breed said she wants to add nearly 50 Public Works employees assigned to keep the streets clean. She has the money to do so. But the hiring will be difficult.

Among the current governing paradoxes for Breed and other civic leaders is what might be called the inside-outside problem.

AD

AD

Walk along Market Street, once a seam line separating glamorous San Francisco from some of its seedier southern neighborhoods. Now it is a stretch that features among other new landmarks the offices of Twitter. The building, linked to another by a skywalk, includes a “permission-only” courtyard accessible from the street.

Behind glass on one side of the narrow courtyard is SF Fitness, its spinning class packed during a recent lunch hour. The Market, an upscale takeout place, is on the other side, and in the middle there is an outdoor fire pit where employees gathered on a foggy afternoon to eat noodle soup and sandwiches.

Just outside the gate is what amounts to an open-air heroin shooting gallery on the sidewalks of Market Street. The telltale orange caps are bountiful. Black metal bins, labeled “Biohazard,” are set out for syringe disposal.

AD

AD

Behind a cluster of nearby lunch trucks serving tuna poke and tacos al pastor, a half-dozen men worked small needles into their arms during the same lunch hour, one sprawling back on the hard ledge where he sat after doing so.

“I’ve just never seen so many people shooting up on a walk to work as I have recently,” said Holly, a 27-year-old who recently moved here from Los Angeles and declined to give her last name for fear it might get her in trouble with her employers. “I know I am part of the problem, the high housing costs, and I’m not proud of that. But I really hope this city is focused on this drug use.”

Breed and others want to move the drug use indoors, providing safe-injection sites where addicts will have privacy and clean needles pending a hoped-for rehabilitation. The state legislature recently approved a measure allowing San Francisco to begin a three-year test program.

AD

AD

Visiting a model safe-injection clinic this week, Breed announced that she wants to open a real one “as soon as possible,” a tacit statement of resistance to federal drug policy. She said the city would first have to determine how to protect the clinics’ operators from federal prosecution, which has been threatened.

The city also wants to move tech workers outdoors, at least during mealtimes. Under a measure before the city government, new tech companies would not be allowed to open on-site cafeterias, long a lure to would-be employees, hoping to better spread the wealth from within the city’s insular tech offices to the local restaurants and lunch trucks just outside.

Tech leaders oppose the measure. But much of the business community, often viewed here as more problem than partner, says Breed is on the right track.

AD

“We’re feeling encouraged about the progress we’re seeing and the plan that is beginning to take shape,” said Kevin Carroll, executive director of the Hotel Council of San Francisco. “As a city, just working to keep the streets clean is a huge priority, and we’re seeing that now.”

Hitting the streets

It is not just Breed and city employees working on those streets. While the challenges along them span the ­social-services spectrum, the focus for many is on the most visible one.

On a recent morning, Ouyang and Regina Piña, the office manager at Zumper, walked with Jessica Donig along Market Street, past Timberland and Zendesk, stopping at the homeless people they encountered every hundred feet or so.

Donig works for the nonprofit Miracle Messages, which seeks to connect San Francisco’s homeless with family members, some of whom have been lost or estranged for years. It is tangible, if difficult, work.

At a bus stop outside a new steel-and-glass hybrid office and shopping mall, Donig crouched down to speak to a woman who gave her name as V. Another woman sat next to her, slumped forward in a wheelchair.

Ouyang dropped Goldfish crackers, a granola bar, socks and wool hats into V’s shopping bag as Donig asked if there were any relatives she would like to reach. V told her she wants to speak to her aunt, Celina, who has custody of her daughter.

“She hasn’t been picking up the phone when I call,” V said.

“If she’s not picking up, well, I don’t know what the dynamic is, but we can certainly try,” Donig said. “Is there anything else I should know before having the conversation?”

After doing this work for a year, Donig said, “what I see is that people are compassionate, but they don’t know what to do. And they don’t want to look these people in the eye without some kind of solution.”

As a company, Zumper conducted a morale survey a few months ago. One of its findings was that employees wanted to be more active in the community.

Zumper began giving employees time off to volunteer, and Miracle Messages was a nonprofit that the company’s chief executive already gave to.

So they hit the streets.