Grid module adds 'spaceBetween' to rightmost slide. #7349
Unanswered
kristiansp
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'll ask here in the discussion section first, as I don't know if this is "bug" or an intended feature – or just a non-optimal solution.
I have a carousel with 2 rows, and notice that the
spaceBetween
also gets added on the rightmost slide, giving the whole carousel an additional right-padding, effectively.In
grid.mjs
the slider width is calculated by explicitly subtracting thespaceBetween
on line 108, which is what to me makes sense:But, then directly after, the style width of the carousel is set by explicitly adding the extra
spaceBetween
back in (unlesscssMode
is activated):I can't really understand why this is –
spaceBetween
should indicate something that is just between the slides, not tucked on at the end?If this is not intended functionality, some more tweaks are probably needed, as the slides themselves has the
spaceBetween
set aspadding-right
. I guess that should be solvable in CSS, withnth-child()
, as it already knows how many slides are in each row.Would be curious to hear other people's thoughts around this, and weather it warrants a bug report or a improvement suggestion.
Beta Was this translation helpful? Give feedback.
All reactions