[SCSS] Use Math lib
@use 'sass:math';
.menu-item {
opacity: 0;
transition: 0.5s;
}
$r: 120px;
$n: 6;
$step: 360deg / $n;
for $i from 1 through $n {
.board:hover .menu-item:nth-child(#{$i}) {
$deg: $step * ($i - 1);
$x: $r * math.sin($deg);
$y: -$r * math.cos($deg);
// @debug $x, $y;
transform: translate($x, $y);
opacity: 1;
}
}