mirror of
https://github.com/lscambo13/ElegantFin.git
synced 2025-09-18 12:40:16 +00:00
Fix: Simplified the card size calculation formula to prevent issues caused by minification
It was removing units from zero values which broke the formula
This commit is contained in:
@@ -130,7 +130,7 @@ html {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.layout-mobile {
|
.layout-mobile {
|
||||||
--itemColumnGap: 0em;
|
--itemColumnGap: 0;
|
||||||
--sidePadding: 5%;
|
--sidePadding: 5%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -748,9 +748,21 @@ html {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
|
--effectiveWidth: calc((99vw - (var(--sidePadding) * 2)));
|
||||||
|
--cardWidth: calc(var(--effectiveWidth) / var(--cardCount) - var(--itemColumnGap));
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: var(--cardWidth) !important;
|
width: var(--cardWidth) !important;
|
||||||
--cardWidth: calc((99vw - (var(--sidePadding) * 2)) / var(--cardCount) - var(--itemColumnGap));
|
}
|
||||||
|
|
||||||
|
.layout-mobile .card {
|
||||||
|
--cardWidth: calc(var(--effectiveWidth) / var(--cardCount));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* this makes the card sizes smaller when phone is in landscape mode */
|
||||||
|
@media (orientation: landscape) and (max-height: 40em) {
|
||||||
|
.layout-mobile .card {
|
||||||
|
--effectiveWidth: calc((65vw - (var(--sidePadding) * 2)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.detailPageWrapperContainer {
|
.detailPageWrapperContainer {
|
||||||
@@ -1199,13 +1211,6 @@ html {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* this makes the card sizes smaller when phone is in landscape mode */
|
|
||||||
@media (orientation: landscape) and (max-height: 40em) {
|
|
||||||
.layout-mobile .card {
|
|
||||||
--cardWidth: calc((65vw - (var(--sidePadding) * 2)) / var(--cardCount) - var(--itemColumnGap));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
font-size: 1.25em;
|
font-size: 1.25em;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user