Under the City Charter, the succession plan works like this: if the Mayor leaves before the due expiry of his office, then the President of the Board becomes Acting Mayor. But the Acting Mayor doesn't get to keep the job for any specified time; unless the vacancy occurs within 120 days of a regularly scheduled election, the Board of Supervisors gets to nominate and then appoint, by majority vote, a new mayor. And they can appoint anyone.
