My highschool had a no yoga pants/tights/stretch pants/leggings rule. But only enforced it for the not hot girls.
One day I wore a pair of my (at the time) girlfriend's yoga pants to school. When a teacher stopped in me the hallway I just pointed out all the other girls wearing them with no issue. I got detention but yoga pants were never brought up again.
Also the volleyball team wore yoga shorts as part of the uniform.
I do love the "shorts can be no more than 1 inch above the knees", but "cheerleaders get to wear the equivalent of bathing suits to class because it is a 'uniform'."