mantinedev / mantine

A fully featured React components library
https://mantine.dev
MIT License
26.97k stars 1.9k forks source link

Title component default styles #3680

Closed farzindev closed 1 year ago

farzindev commented 1 year ago

What package has an issue

@mantine/core

Describe the bug

Is there a reason that we have 2 sets of font styles and line-heights in the Title component by default?

image

You can also inspect it in this example: https://ui.mantine.dev/category/hero

Which in that example we have actually 3 font-family. I asume the third one is the custom one.

image

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

6

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

provided the link

Do you know how to fix the issue

I'm not sure if it's intentional.

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

I'm not sure yet.

Possible fix

https://github.com/mantinedev/mantine/blob/c2f0c51d610fb0dfd30d44858b414178d4a18aff/src/mantine-core/src/Title/Title.styles.ts#L30

rtivital commented 1 year ago

It is expected behavior, Title component extends Text, both components add font-family styles which can be different.