Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mantine Tooltip Depends on --mantine-scale, which is not defined in HeadlessProvider #6458

Closed
1 of 2 tasks
lvgomes1 opened this issue Jun 26, 2024 · 1 comment
Closed
1 of 2 tasks
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@lvgomes1
Copy link

lvgomes1 commented Jun 26, 2024

Dependencies check up

  • I have verified that I use latest version of all @mantine/* packages

What version of @mantine/* packages do you have in package.json?

7.11.0

What package has an issue?

@mantine/core

What framework do you use?

Vite

In which browsers you can reproduce the issue?

All

Describe the bug

  1. Use Mantine in Headless mode, use HeadlessMantineProvider
  2. Import and use the Tooltip from mantine: import { Tooltip } from '@mantine/core'
  3. Try and render the tooltip, set withArrow as true
  4. Observe the html and see that the computed width and height is 0, since the CSS is always dependent on the --mantine-scale property. Even when setting any arrowSize, the width and height remains 0.
image

It seems the only way around this is if we add the following line:

import '@mantine/core/styles.css'

which might not be ideal for users of Mantine in Headless mode.

If possible, include a link to a codesandbox with a minimal reproduction

https://codesandbox.io/p/sandbox/mantine-react-template-forked-ls9jj9?file=%2Fsrc%2FApp.tsx%3A11%2C17

Possible fix

Possibly remove the dependency on --mantineScale for height and width. Or possibly allow users to pass in explicit height and width in stylesAPI, which may not be allowed at the moment.

Self-service

  • I would be willing to implement a fix for this issue
@rtivital rtivital added the Fixed patch Completed issues that will be published with next patch (1.0.X) label Jun 27, 2024
@rtivital
Copy link
Member

rtivital commented Jul 2, 2024

Fixed in 7.11.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)
Projects
None yet
Development

No branches or pull requests

2 participants