Combine Sass mixin and CSS class? -


i've created sass mixin , css class have same styling, developers have option either add class html or apply mixin sass.

@mixin link-style-1 {     background: $red;     padding:  .75em 45px .75em 5%; } .link-style-1 {     background: $red;     padding:  .75em 45px .75em 5%; } 

is there way of combing these 2 1? know use variable padding both, code bit longer , harder read. there cleaner solution?

you can include mixin in class dryness:

@mixin link-style-1 {     background: $red;     padding:  .75em 45px .75em 5%; } .link-style-1 {     @include link-style-1; } 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -