@mantine/core Text component color is not inherited
See original GitHub issueIt seems like the Text
component does not inherit color value from parents by default and only if we set sx={{ color: "inherit" }}>
does it work
Is that intended?
Codesanbox example: https://codesandbox.io/s/mantine-bug-h26lc
Would it be terrible to alter Text
source code to default color
to inherited
? https://github.com/mantinedev/mantine/blob/master/src/mantine-core/src/components/Text/Text.tsx#L61
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Text | Mantine
Use Text component to display text and links with theme styles. ... color-from and color-to are color from theme.colors; deg is linear gradient...
Read more >mantine/Text.mdx at master - GitHub
Usage. Use Text component to display text and links with theme styles. · Gradient variant. To use gradient as Text color: · Line...
Read more >Highlight - Dash Mantine Components
If main string does not include highlight part, it will be ignored. Component ignores ... Highlight component supports same props as Text component....
Read more >Styles - Lit.dev
In a style element; Import an external stylesheet (not recommended). Dynamic classes and styles; Theming. CSS inheritance; CSS custom properties ...
Read more >Material UI Custom theme color assign Typescript
In my case I only need neutral to be read by the Button component so you do this ... let theme = createTheme({...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you want Text to inherit color, you can use the
sx
as you described above. In most cases where you would want to inherit color you can replace Text with just a div element or Box component.Feature was released in 3.2