how to inheritance multiples class through sass -


i have scenario in sass .a{     background-color: red;     padding :20px;      h4{ padding-bottom :20px;} } // class  .b{      background-color : blue;      padding : 20px      h4{ padding-bottom:20px}  } 

question: how can combine padding , h4 in sass without repeating padding , h4 properties

the straight forward way use @extend.

%common_properties {     padding: 20px;      h4 {         padding-bottom: 20px;     } }  .a {     @extend %common_properties;      background-color: red; }  .b {      @extend %common_properties;      background-color: blue;  } 

Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -