Morocco has 2 festivals in this guide, spread across 2 cities. They run in June and September, and festival-day temperatures range from 22°C (72°F) to 34°C (93°F), with nights down to 16°C (61°F). That range is the reason there is no single "Morocco festival outfit". The answer changes by month and by site.
1 of them runs in real heat (28°C or more), where loose natural fabrics beat coverage and a brimmed hat does more than any garment.
The ground matters as much as the sky. You will find beach and desert, which puts closed boots or trainers you accept will change colour at the top of the list for most of these events. None of them have camping on site, so you are travelling in and out each day and the outfit has to survive the journey at both ends.
Stylistically the crowd here leans boho, elegant, beach and hippie. Gnaoua World Music Festival is the largest of them at around 300,000 people, and it sets the tone the smaller ones react to. None of that is a dress code. It is what you will see, which is worth knowing if you would rather blend in or deliberately not.