#NextJS and Sass example

6 messages · Page 1 of 1 (latest)

solemn raft
#

Is there an example or a template for an app using Mantine with NextJS and Sass?
I'm struggling to get the mixins working and I think it is probably my config, so I'd like to check it against something that works.

solemn raft
#

So it looks like the mixins described in this guide (https://mantine.dev/styles/sass/#usage-with-nextjs) are not working as expected! I pulled down the code from the template you linked, added the _mantine.scss file, and then added some styling to the Button component using sass. While basic sass worked as expected and I was able to use the rem function from the postcss-preset-mantine package, I was unable to use any of the mixins from the package!
Do you have any advice or an example with the mixins working?

React components and hooks library with native dark theme support and focus on usability, accessibility and developer experience

trail prawn
solemn raft
#

Yea, I added this to the config in the sass example:

  sassOptions: {
    prependData: `@import "./_mantine.scss";`,
  },
#

if it makes sense, I can open an issue on the postcss-preset-mantine repo since the functions are working but the mixins are not!