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
Post a Comment