Google News
logo
Sass - Interview Questions
What is the use of at-root directive in SASS?
The Sass @at-root directive is a collection of nested rules that are used to style block at the root of the document.

For example :
 
 h2{    
   color: blue;    
    background-color: pink;    
   @at-root {    
         .style{    
             font-size: 20px;    
             font-style: bold;    
             color: violet;    
         }    
    }    
}

 

Advertisement