Is this considered discrimination at work?

Embry

So a couple days ago I woke up realizing my work jeans no longer fit me due to growing bump it is part of the dress code policy to wear jeans but I work at 8:00am and had no time to go shopping so I wore some leggings my supervisor came up to me and said that I would be sent home next time I wore them and could be fired if it dosnt stop and I need to get maternity pants . I assured him I would look for some the next day since it was my day off but I havnt been able to find any in my size at the stores I’ve gone to in a very small person like xs and 5”0 so it’s often hard to find fitted pants especially maternity I’ve realized today I came into work in jeans that restricted my movement and breathing and noticed again that the other pregnant woman in the store was wearing black leggings wich I always see her wearing I went up to a different supervisor because the one I had talked to prior wasn’t there and told him I looked for maternity pants but couldn’t find any that fit and most likely would need to order them but I couldn’t work in the jeans I was wearing all day so I asked if I could wear leggings just for the day or go home and he said to go home . He also told me that it’s just policy and you have to follow dress code when I brought up other women wearing leggings and he told me that I don’t know what conversations have been had between them and the other supervisor and he didn’t either meanwhile the other pregnant women was standing right there filling cases in black leggings so I’m frustrated I contacted hr but they havnt done anything in the past and I’m wondering if there’s someone else I should contact. I just feel it’s unfair to be told I will be sent home if I wear the only pants that fit me right now just for the time being until I can get maternity pants when I may have to order them to find my size wich would take a couple days to actually receive