Mantine setting styles on body
& :root
#5685
-
Hi, I'm a developer on BlockNote, and we're using Mantine for our UI. After migrating to v7 I noticed that importing So, is there a recommended way to reset the styles set on |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can include only styles that are required for components that you use with https://mantine.dev/styles/css-files-list/ |
Beta Was this translation helpful? Give feedback.
You can include only styles that are required for components that you use with https://mantine.dev/styles/css-files-list/
If you do not import
import '@mantine/core/styles/global.css';
, then there will be no global styles. Note that you will need to define default CSS variables on your side if MantineProvider is supposed to be supplied by end users. If you include MantineProvider in your library, then set https://mantine.dev/theming/mantine-provider/#cssvariablesselector, in this case CSS variables will be generated in the runtime. Additionally, I recommend copying global styles that are defined forbody
and*
to the root element of your component.