Regardless of one's take on the Supreme Court's 5-4 decision on Friday forbidding states from banning same-sex marriage, it's clear the ruling didn't come in a vacuum. Analysts said the court "created" a new civil right, but public attitudes have shifted dramatically in recent years. The court simply gave its blessing to a cultural change that already has taken place.

We see another long-in-the-making social change on the issue of marijuana. A recent poll by the Public Policy Institute of California found 55 percent of likely California voters in favor of legalizing weed for recreational uses. Support for such an idea was barely perceptible decades ago.

But courts and legislatures usually lag far behind changing public perceptions. California legalized the use of medical marijuana with Proposition 215 in 1996. But as this column reported recently, the state still hasn't figured out a simple way for dispensaries to pay their taxes (they are banned from having bank accounts, but the Board of Equalization usually doesn't accept cash). This year's Legislature may finally create a "licensing and regulatory framework" for medical marijuana(AB 266), nearly two decades later. Meanwhile, the public has moved beyond "medical" marijuana.

In 2012 Washington and Colorado voters approved legalization for adults and in the 2014 midterm elections voters did the same in Oregon, Alaska and Washington, D.C.There are plans for initiatives in seven other states in 2016. Legalization supporters have filed a few initiatives in California — but none are likely to cause consternation among drug warriorsbecause they may not have sufficient financial backing.

I attended a meeting of legalization heavy hitters recently in Sacramento. Going under the name of Reform California, this group is trying to agree on a "unity" initiative that not only satisfies the diverse group of legalization supporters, but is careful enough to win a statewide election. "Politics is the art of the possible," said Jim Gonzalez, a senior adviser. "The California electorate is still very cautious." He wants to make sure the language is palatable to assuage any fears it will turn California into Amsterdam.

But there's no doubt we're seeing a "cannabis revolution," he adds, as public support grows. Gonzalez compares himself to Rip van Winkle: He was campaign manager for Proposition 215 and now he's involved in this effort again — but finds himself in a far different political climate.

Reform California hasn't issued ballot language, but its website details some general principles. Any initiative must provide protection for existing medical marijuana patients, make adult use of marijuana legal in limited amounts, allow a limited right to cultivate it, create a uniform tax system — while preventing sales to minors and combating drugged driving.

The group is waiting to see the fate of AB 266 given that any changes in marijuana-related law would need to be addressed in its ballot language. Supporters also are waiting for Lt. Gov. Gavin Newsom, a legalization supporter, to issue in early July the final report from the Blue Ribbon Commission on Marijuana Policy.

The commission's progress report, released in March, listed many thorny issues that need to be resolved. For instance, it addressed testing for drugged driving: "THC, the main psychoactive agent in marijuana, is fat-soluble and can remain in the body and blood for a long time… . A strict system that penalizes drivers based on THC levels in the blood could have the unintended impact of penalizing drivers who are not impaired."

California voters were asked to legalize marijuana in 2010. But Proposition 19 would have "created a patchwork system where marijuana would only be legalized by city or county," explained Dale Gieringer, director of California NORML (National Organization for the Reform of Marijuana Laws). A person could leave San Francisco with a legal product — and face felony charges a mile away in San Mateo County.

Nevertheless, that flawed initiative garnered nearly 47 percent of the vote. We'll see what happens, but I'll return to the gay marriage analogy — the battle already is over. It's just a matter of time before the political and legal systems recognize it.