Skip to content

Commit

Permalink
tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
tinchox5 committed Jun 12, 2023
1 parent 0652376 commit cc73b95
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
19 changes: 10 additions & 9 deletions src/layouts/_radial-grid.scss
Original file line number Diff line number Diff line change
@@ -1,32 +1,36 @@
@use '../utilities/sass-variables' as *;

@each $arc, $value in $arcs {
.#{$arc} > .item, .#{$arc} > .arc {
.#{$arc} > .item,
.#{$arc} > .arc {
--arc: #{$value};
}
}
@each $sector, $angle in $sectors {
.#{$sector} > .item, .#{$sector} > .arc {
.#{$sector} > .item,
.#{$sector} > .arc {
--offset-angle: #{$angle};
}
}

.ccw {
--direction: -1;
}

@for $i from $min-items through $max-items {
.items-#{$i} > .item, .items-#{$i} > .arc {
.items-#{$i} > .item,
.items-#{$i} > .arc {
--angle: calc((var(--arc) / #{$i}) * var(--direction));
}
}
@for $i from $min-items through $max-items {
@each $arc, $value in $arcs {
.items-#{$i}.#{$arc}> .item {
.items-#{$i}.#{$arc} > .item {
--angle: calc((var(--arc) / #{$i - 1}) * var(--direction));
}
}
}
}


@for $i from $min-rings through $max-rings {
$resta: 1;
@if $i == 1 {
Expand Down Expand Up @@ -122,6 +126,3 @@
--item-number: #{$i};
}
}



5 changes: 4 additions & 1 deletion src/utilities/_sass-variables.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/* Variables */
// Sass variables
$prefix: 'zr-';

$sizes: 'xxs' var(--xxs), 'xs' var(--xs), 's' var(--s), 'm' var(--m),
'l' var(--l), 'xl' var(--xl), 'xxl' var(--xxl);

Expand All @@ -12,6 +14,7 @@ $max-items: 24;

$sectors: 'offset-45' 45, 'offset-90' 90, 'offset-135' 135, 'offset-180' 180,
'offset-225' 225, 'offset-270' 270, 'offset-315' 315;

$arcs: 'arc-45' 45, 'arc-90' 90, 'arc-135' 135, 'arc-180' 180, 'arc-225' 225,
'arc-270' 270, 'arc-315' 315;

Expand Down

0 comments on commit cc73b95

Please sign in to comment.