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) -

xcode - Swift Playground - Files are not readable -

jboss7.x - JBoss AS 7.3 vs 7.4 and differences -