A dress code doesn't have to be a specific set of clothing you have to wear. It can simply tell you what you can and can't wear, such as skirt length.
This is probably the best you're gonna get to stop all contoversy about this stuff- let students wear what the want, but have restrictions.