question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wrong carousel size calculation formula when includeGapInSize = true

See original GitHub issue

What package has an issue

@mantine/carousel

Describe the bug

When includeGapInSize true, we have styles logic on item like that

	flex: 0 0 calc(var(--slideWidth) - var(--slideGap) / 2);
	margin-right: var(--slideGap);

This produce wrong calculations https://codepen.io/7iomka/pen/xxjRQGw

And get me unexpected behavior when I’m slide with nav buttons

https://user-images.githubusercontent.com/18473137/190236075-87fc1aa7-44e9-4f72-8bab-1740aa3a8d9f.mov

What version of @mantine/hooks page do you have in package.json?

latest

If possible, please include a link to a codesandbox with the reproduced problem

No response

Do you know how to fix the issue

Yes

Are you willing to participate in fixing this issue and create a pull request with the fix

No response

Possible fix

Use another formula One of popular solutions: https://codepen.io/7iomka/pen/abGBQmd

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
gyancodescommented, Sep 19, 2022

@7iomka Still I am working on it 🤦‍♂️, I think It will take some time.

0reactions
7iomkacommented, Sep 28, 2022

@7iomka can you create a PR with a fix?

ok

Read more comments on GitHub >

github_iconTop Results From Across the Web

Image from \includegraphics showing in wrong image size - TeX
The "physical" size of the image in cm and inch, which is obtained by multiplying the size in pixels with the resolution, is...
Read more >
include pictures with wrong scale - LaTeX.org
I have 2 pictures with the same size (712x484). I used \includegraphics(width=6.5cm){filename) to add them into my paper but the pictures ...
Read more >
scale include graphics latex Code Example - Code Grepper
Answers related to “scale include graphics latex”. latex bigger or equal · include picture in latex · latex change size of text ·...
Read more >
AVEVA™ - Application Server - Index of /docs
If the Autoplay property is set to true, the carousel widget will automatically start on load. If it is set to false, the...
Read more >
HbbTV 2.0.3 Specification
Currently operational broadband connection and error accessing initial page . ... Subsequent carousel mountings (during the lifecycle of an application).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found