For decades, California’s landmark environmental law has required a peculiar standard of new transportation and development projects: that they not create more traffic.

In principle, this provision, called Level of Service, sounds good: Traffic is bad for the environment, because cars are spending more time on the road. In practice, the rule has made it even harder for the housing-challenged state to add new homes—and also crosswalks, bus lanes, and any other impediment to the free movement of automobiles.

In 2006, for example, a California judge issued an injunction stopping San Francisco from installing so much as a bike rack after a lawsuit alleged the city’s bike infrastructure plan violated the California Environmental Quality Act by making things worse for local drivers. San Francisco spent years, and more than $1 million, preparing 1,353 pages in environmental impact study to demonstrate that bike lanes were not, in fact, bad for the environment.

This month, the state has finally revised that portion of CEQA to permit a better standard for managing traffic, according to Streetsblog (whose coverage of the issue has been indispensable).

With the old LOS standard, planners assigned letter grades to intersections based on how fast cars move through them. If an intersection sank to a certain grade, planners might be forced to rebuild it with more lanes. Projects creating more traffic were required to mitigate their effects. Under LOS, adding traffic lanes to existing roads—as the Orange County city of Santa Ana is doing on Warner Avenue, demolishing dozens of homes in the process—was good for the environment. “In the year 2020 this segment of Warner Avenue is projected to have an LOS rating of ‘F’ (a road in a constant traffic jam),” the city boasted. “With the proposed improvements, the segment will operate at a LOS ‘A’ (free flow traffic).”

But public transit projects—such as San Francisco’s Van Ness bus rapid transit, which was held up because changing car lanes to bus lanes were under LOS—would have sent intersections falling to low grades. Same for crosswalks. And bike lanes. And housing built anywhere but farmland, which adds some traffic to local streets but reduces regional driving by allowing people to live closer to jobs, schools, and amenities.

“We have one section of CEQA saying we’ve got to reduce greenhouse gas emissions,” transportation consultant Jeffrey Tumlin told City Lab in 2014, “and another section of CEQA saying we need to accommodate unlimited driving.”

Not anymore. The new rules will put more emphasis on the number of vehicle-miles traveled rather than roadway speed. So if a bus lane slows down car traffic but lots of drivers have now ditched their cars to ride the bus to work, that’s a good project because fewer miles are being traveled by car. (Streetsblog has more on the particulars.)

The laws won’t apply to all new environmental reports until 2020, but some cities aren’t waiting around: San Jose opted to change its measuring system for new project impacts last year. Pasadena, San Francisco, and Oakland preceded it. The rest of the state isn’t far behind.