It is illegal.
So is driving with a ding in your windshield.
Or, wipers that leave creases.
Both far more egregious crimes.
I read a couple of sources that mention five minute idling laws for both CA and Sacramento. Is that what you’referring to?