Fix component autosizing not working on mobile grids

This commit is contained in:
Andrew Kingston 2024-08-02 09:23:47 +01:00
parent 5cc4002f32
commit 8dd0658f18
No known key found for this signature in database
1 changed files with 17 additions and 6 deletions

View File

@ -115,7 +115,6 @@
--grid-desktop-col-end, --grid-desktop-col-end,
var( var(
--grid-mobile-col-end, --grid-mobile-col-end,
/* Our final*/
round(up, calc(var(--default-width) / var(--col-size) + 1)) round(up, calc(var(--default-width) / var(--col-size) + 1))
) )
); );
@ -155,9 +154,21 @@
.grid.mobile :global(> .component) { .grid.mobile :global(> .component) {
/* Position vars */ /* Position vars */
--col-start: var(--grid-mobile-col-start, var(--grid-desktop-col-start, 1)); --col-start: var(--grid-mobile-col-start, var(--grid-desktop-col-start, 1));
--col-end: var(--grid-mobile-col-end, var(--grid-desktop-col-end, 2)); --col-end: var(
--grid-mobile-col-end,
var(
--grid-desktop-col-end,
round(up, calc(var(--default-width) / var(--col-size) + 1))
)
);
--row-start: var(--grid-mobile-row-start, var(--grid-desktop-row-start, 1)); --row-start: var(--grid-mobile-row-start, var(--grid-desktop-row-start, 1));
--row-end: var(--grid-mobile-row-end, var(--grid-desktop-row-end, 2)); --row-end: var(
--grid-mobile-row-end,
var(
--grid-desktop-row-end,
round(up, calc(var(--default-height) / var(--row-size) + 1))
)
);
/* Flex vars */ /* Flex vars */
--h-align: var(--grid-mobile-h-align, var(--grid-desktop-h-align, stretch)); --h-align: var(--grid-mobile-h-align, var(--grid-desktop-h-align, stretch));