Skip to content

Some elements do not respect override of var(--mantine-color-text) #8231

@HelloItsKarina

Description

@HelloItsKarina

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?

8.2.8

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

Hi all, thanks for your work on this awesome UI library.

I override my body text by defining...

const cssVariablesResolver = () => ({
  variables: {
    '--mantine-color-text': 'var(--mantine-color-red-6)',
  },
})

...and then passing it like so:

<MantineProvider cssVariablesResolver={cssVariablesResolver}>

Almost everything throughout the app respects my definition of var(--mantine-color-text). Here are some instances in which it's not respected:

(1) In @mantine/notifications, a notification's title and message elements do not respect my override:
Image

(2) In @mantine/charts/PieChart, the tooltip label associated with segment name does not respect my override.
Image

(3) In @mantine/charts/AreaChart, the tooltip labels associated with the dataKey (x-axis) and the value (y-axis) do not respect my override.
Image

"How could you want red body text?"

I don't. 😅 I actually want dark grey body text. I just used red to make clear in my examples which text is and isn't respecting my override.

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

No response

Possible fix

No response

Self-service

  • I would be willing to implement a fix for this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions