Skip to content

Commit 0804e37

Browse files
committed
fix
1 parent 854f23f commit 0804e37

1 file changed

Lines changed: 18 additions & 19 deletions

File tree

app/components/home/hero.vue

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@
9898
data-rellax-xs-speed="-3"
9999
data-rellax-percentage="0.5"
100100
>
101-
<div class="circle w-full bg-light shadow-xl"></div>
102-
<div class="circle w-3/4 bg-light shadow-lg"></div>
103-
<div class="circle w-2/4 bg-light shadow-lg"></div>
104-
<div class="circle w-1/4 bg-light shadow-md"></div>
101+
<div class="circle size-full bg-light shadow-xl"></div>
102+
<div class="circle size-3-4 bg-light shadow-lg"></div>
103+
<div class="circle size-2-4 bg-light shadow-lg"></div>
104+
<div class="circle size-1-4 bg-light shadow-md"></div>
105105
</div>
106106
</section>
107107
</template>
@@ -110,23 +110,22 @@
110110
.circle {
111111
@apply rounded-full absolute;
112112
113-
&.w-full {
113+
&.size-full {
114114
height: 100%;
115+
top: 0;
116+
left: 0;
117+
width: 100%;
115118
}
116-
&.w-3\/4 {
117-
top: calc((100% - (100% / (4 / 3))) / 2);
118-
left: calc((100% - (100% / (4 / 3))) / 2);
119-
height: calc(100% / (4 / 3));
120-
}
121-
&.w-2\/4 {
122-
top: calc((100% - (100% / (4 / 2))) / 2);
123-
left: calc((100% - (100% / (4 / 2))) / 2);
124-
height: calc(100% / (4 / 2));
125-
}
126-
&.w-1\/4 {
127-
top: calc((100% - (100% / (4 / 1))) / 2);
128-
left: calc((100% - (100% / (4 / 1))) / 2);
129-
height: calc(100% / 4);
119+
120+
@for $i from 1 through 3 {
121+
$ratio: $i / 4;
122+
&.size-#{$i}-4 {
123+
$h: $ratio * 100%;
124+
top: (100% - $h) / 2;
125+
left: (100% - $h) / 2;
126+
height: $h;
127+
width: $h;
128+
}
130129
}
131130
}
132131

0 commit comments

Comments
 (0)