California cannot really ban gas cars or gas vehicles.
However California can ban the sale of new gasoline cars or gasoline vehicles in their state but not ban current gasoline cars or gasoline vehicles that are being operated as of now.
Banning gasoline cars is not a good idea and actually doing so means less taxes for the roads etc when people go all electric.
Electric cars are not all that great for the environment either as electric cars use electricity to charge the batteries which sometimes uses coal, natural gas etc to create the electricity.
Also electric cars require charging which is actually not always convenient as it can take awhile to charge the electric car up.
With gasoline you just fill the car up and go but with an electric car you must wait a few hours or so before your battery is charged up.
With gasoline it takes maybe a few minutes to fill up and then leave.
Electric cars also use resources to make which are not that great for the environment.
If California did actually ban gas cars or gas vehicles then the state of California would lose a lot of residents.
Many people are already leaving California due to too many regulations and adding more regulations and banning gas cars would likely cause more people to leave California.