Sass - two classes in a single tag

ming yeow picture ming yeow · Dec 2, 2011 · Viewed 69.7k times · Source

So, i need a style for

.question_actions.active

my existing CSS

.question_actions {
    float: right;
    font-size: 1em;
    width: 110px; 
}
.question_action {
    margin-bottom: 8px; 
    padding: 3px;
}
.question_actions.active {
    /* some CSS */
}

what would be the syntax to combine them?

Answer

Rito picture Rito · Dec 6, 2011

Here you go:

.question_actions {
   float: right; 
   font-size: 1em;
   width: 110px; 

   .question_action {
       margin-bottom:8px;
       padding: 3px;
   }

   &.active {
    //some css
   }
}