Use function/mixin in Less selector
问题 I need to repeat my selector. is there any way in Less CSS to do this with function/mixin? Note: Content of frame is different. .slide1{ .frame{ .obj1{} .obj2{} .obj3{} } [data-fragment=1].active ~ .frame { .obj1{} .obj2{} /* frame1 css */ } [data-fragment=2].active ~ .frame { .obj2{} .obj3{} /* frame2 css */ } /* other frames ... */ } .slide2{ /* slide2 css */ } /* other slides ... */ to .slide1{ .frame{/* ... */} .frameselector(1){/* frame1 css */} .frameselector(2){/* frame2 css */} }