Monday, April 3, 2017

SCSS - Change Color of A Numbered CSS List

This can be done with the following code in SASS:
  ol {  
     counter-reset: li;  
   }  
   ol li {  
   }  
   ol li:before {  
     content: counter(li)". ";  
     counter-increment: li;  
     position: absolute;  
     left: 0;  
     top: 0;  
     margin: 0 0 0 -7px;  
     width: auto;  
     height: auto;  
     font-weight: bold;  
     color: orange;  
   }  


Sass Reminder:
pluset säger ju att "alla element som kommer efter element x"

No comments:

Post a Comment