1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
| $col-width: 60px; $col-gap: 20px;
@for $i from 1 through 12 { .col-#{$i}{ width: ($col-width + $col-gap) * $i; } }
$properties: (margin, padding); @mixin set-value($side, $value) { @each $prop in $properties { #{$prop}-#{$side}: $value; } } .login-box { @include set-value(top, 14px); }
@mixin e($element, $content) { background: 'yellow'; &__#{$element} { color: 'black'; @each $k, $v in $content { #{$k}: $v } } }
@include e('content', ('display': flex, 'height': 100))
/* while */ $types: 4; $type-width: 20px; @while $types > 0 { .while-#{$types} { width: $type-width + $types; } $types: $types - 1; }
p{ color: #010203 + #040506 /* #050709; */ }
@function widthFn($n) { @return $n * $twoWidth + ($n - 1) * $oneWidth; }
|