Suppose I have two virtually identical HTML structures, but with different class names. They only differ by a few variables, like width and h
class
width
h
Your problem can be solved by using a mixin.
@mixin button($width){ button{ background:red; width:$width; } } .widget-a{ @include button(50px); } .widget-b{ @include button(100px); }