Leggings are fine under a dress.
I had leggings in gray, black, and brown this winter, so I could wear the gray skirt, the black skirt, and the brown dress without freezing my knees. I could even wear them under my Scout uniform pants. A brilliant invention!