Can I wear leggings if I wear a tunic that covers my hips and down to knee? Or shouldnt the shape and form of the legs be displayed?

If the shape of the legs is visible and attracts attention then it is haraam to wear such leggings unless they are covered by a longer dress