It also requires employers to provide "reasonable accommodations" to pregnant women, such as giving more leeway when it comes to taking bathroom breaks or sitting down at work.
Jenny Wittner with the Chicago-based advocacy group Women Employed, says this type of discrimination especially hurts women in lower-paying jobs.
"It has a dual impact to be pregnant and need accommodations and be in a job that doesn't pay well, where you need the money, you can't take time off, you don't have those kinds of benefits and abilities that you have in other types of employment."
Wittner says these women also have a harder time fighting back against employers who refuse accommodations, or threaten their jobs. The governor signed the law on Women's Equality Day, but doesn't take effect until the new year.
The law only applies to employers with more than 15 workers, after some backlash from the small business community during the General Assembly's Spring session.