SCSS - For Loop

index.html


<h1>Im header 1</h1>
<h2>Im header 2</h2>
<h3>Im header 3</h3>
<h4>Im header 4</h4>
<h5>Im header 5</h5>
<h6>Im header 6</h6>

style.scss

@for $i from 1 to 7 { // include 1 exclude 7  
    h#{$i}{ // #{} -> interpolation    
       font-size: 55px - $i * 3;
  }
}

Bu blogdaki popüler yayınlar

About Android padding, margin, width, height, wrap_content, match_parent, R Class