"Maybe" is my answer, but that option doesn't exist among the poll options. I don't see the matter as binary, which is how the poll answer options tacitly present it.
I am of the mind that there are very few always-appropriate/always-inappropriate garments for individuals to wear. What "works" and when and what does not "work" and when depends as much on the wearer as it does on the circumstance of the wearing.
If the child is going to wear them as shown below, then no....
If the child wears them as shown below, I see no problem with their doing so....
These ways of wearing leggings is fine for going to class.
(I don't approve of the coquettish bimbo pose, but the leggings are okay.)
The photos below are of high school students at the high school my son attended.
These looks are a bit more fashionable than I suspect most girls would don for school, but if my daughter were to wear it to class, I wouldn't object on the grounds of the leggings being inappropriate.
(Is the coquettish bimbo pose "a thing" among young women these days?")
If the school has an equestrian program, wearing something like this is fine for practice and whatnot. The look below is fairly typical of what my daughter wears/wore for recreational riding activities.
Similarly, if the child's body shape is what I call "two tons of fun," then, mostly no, she should not wear leggings in lieu of pants or a dress/skirt. However, if she or her style guides have good style sense, there're ways she can wear leggings that don't look gross.
At the end of the day, it just depends....I think parents and a school's administrators need to consider each case individually. Of course, school administrations prefer "cookie cutter" approaches to things like dress codes, but they are sometimes reticent or disallowed to implement a mandated uniform.
Aside:
I don't know why, but it strikes me as odd that, for the most part, dress code issues seem to swirl around girls rather than boys. I have three boys and a girl, and all of them figured out how to "put their sexy on" well before I'd have liked them to. As goes young male "sexy dress," what I observed differing was that "boy sexy" seemed to focus on how loose garments drape over their muscles rather than being skintight. From what I can tell, my kids' friends know as much about "putting their sexy on" as do adults.
At the end of the day, I had to accept that neither I nor the school's staff could police their every outfit choice. Accordingly, I had to trust in their exercising the good judgment they were taught to have. Giving kids free reign to exercise good judgment with their sartorial decisions and the consequences thereof strikes me as a fitting part of the "leash" parents can safely give kids. After all, learning to resist sartorial temptation -- be it the wearing or the inspiration attire may catalyze for "reaching out and touching" -- is among the things young people need to learn to resist and, when appropriate, not resist. It's never too soon to learn a lesson, and, frankly, the sooner one learns a lesson, the better.