sass - SCSS - Understanding this Calculation -


in topic ask smarter way write in scss @for function, cool function. problem didnt understand it... need last step.

$sidenavwidth: 320px;  html {   body {      .messenger {        @for $i 1 through 6 {         $z: '';         @if ($i < 10) {           $z: '0';         }         &.item-#{$z}#{$i} {           right: ($sidenavwidth * $i) + (($i * 2) * 8);         }       }      }      &.sidenav-open {       .messenger {         @for $i 1 through 6 {           $z: '';           @if ($i < 10) {             $z: '0';           }           &.item-#{$z}#{$i} {             right: ($sidenavwidth * $i) + (($i * 2) * 8);           }         }       }     }    } } 

i think people understand allready trying do. sidenav default closed. dont need 320px default in "right" property. if sidenav opend, need it.

what must change on code, work?

best regards!


Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

android - Unable to generate FCM token from dynamically instantiated Firebase -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -