Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

SCSS Variables not working

I want to use _metronic for my NextJS app with a ReactJS template. I only moved the _metronic folder, and after doing so, I wanted to use the badge-light component. However, I encountered the following issues:

 --bs-success-light is not defined

When I switch back to the original React setup, it works properly. However, when I use Next.js, the issue persists. Interestingly, when I use the default badge, everything works fine.

pretty sure I already import all the needed scss files like this

import '../src/_metronic/assets/sass/style.scss' import '../src/_metronic/assets/sass/plugins.scss' import '../src/_metronic/assets/sass/style.react.scss'

import '../src/_metronic/assets/fonticon/fonticon.css' import '../src/_metronic/assets/keenicons/duotone/style.css' import '../src/_metronic/assets/keenicons/outline/style.css' import '../src/_metronic/assets/keenicons/solid/style.css'

Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (1)


Hi,

We haven't tried combining our React version with NextJs, we will check it and consider using NextJs in future releases if we will see demand.

If you have loaded all of the styles and installed Bootstrap dependency then Bootstrap variable should be defined. However, please note that our React version is a client SPA application then NextJs is a server-side rendered application that renders differently and it might require you to load styles differently.

To connect Bootsrap to NextJs you can refer to this post.

Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(