I'm a woman and I went to Morocco maybe 13 years ago. Mostly, I was in the High Atlas mountains and the Sahara etc but I did come down to the cities as well.
Ummm I will never understand the people that go to these Muslim countries ... and can't wait to break out in the shorts and tank tops whatnot.

This is HUGELY offensive to the people. It’s not so hot that you need to present yourself in this manner.
Besides the BEST way to keep cool in hot places is to wear long loose fitting cotton dresses. Keep your skin and head covered.
Drap your body .. don't expose it!I've visited a lot really hot places.
In general, yes the country is very conservative especially Casablanca ... but Marrakesh was quite international. However, walking around in tank tops etc would be a mistake in my opinion - as you are just asking to be harassed.
You don’t have to be all wrapped up either. I suggest just wearing regular/modest Western styled clothes .. just like you would wear to any other city. I don’t see the point of pi***** off the people.
Women …
do not give men eye contact on any level. They will be so pi**** off.
There are lot of cultural norms you should be aware of because western people are always having hassles with the locals.
Do your research!