How to merge two class styles using sass? -


how can merge 2 styles blocks of different classes having same properties except "padding" shown in below code in 1 block.

here using sass(syntactically awesome style sheets).any appreciable. thank you.

.bookstyle {      color:  $alt-dark-blue;      padding-left:82.1px;      cursor: pointer;      clear: both;      font-size: 10px;  }    .pagestyle {      color:  $alt-dark-blue;  	clear : both;      cursor: pointer;      font-size: 10px;  }

one way of doing have 1 extend other. here's example of it

.bookstyle {     @extend .pagestyle;      padding-left:82.1px;  }  .pagestyle {     color:  red;       clear : both;     cursor: pointer;     font-size: 10px; } 

alternatively use mixins add required rules.

i'm assuming you're using scss syntax sass way


Comments