Yes, the Government Code specifically addresses employees’ right to wear pants to work in California.

Section 12947.5 states:

(a) It shall be an unlawful employment practice for an employer to refuse to permit an employee to wear pants on account of the sex of the employee.
(b) Nothing in this section shall prohibit an employer from requiring employees in a particular occupation to wear a uniform.

Also, employers should note, dress standards or requirements for personal appearance need to be flexible enough to take into account religious practices. While it is lawful for an employer to implement rules about employee physical appearance, grooming, or dress standards, the standards cannot discriminate based on a protected category, such as race or sex.