Skip to content

Mantine setting styles on body & :root #5685

Answered by rtivital
matthewlipski asked this question in Q&A
Discussion options

You must be logged in to vote

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 for body and * to the root element of your component.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@matthewlipski
Comment options

Answer selected by matthewlipski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants