scss mdb variables in scss of components

Topic: scss mdb variables in scss of components

wandu-ar pro asked 3 years ago

Can i use the scss variables in scss of components?

For example, in the file scss of component test:

.example-class { color: $primary }


Arkadiusz Idzikowski staff answered 3 years ago

It is possible to use variables in your component scss files, you just need to import the variables first:

@import '~ng-uikit-pro-standard/assets/scss/core/colors';
@import '~ng-uikit-pro-standard/assets/scss/core/variables';
@import '~ng-uikit-pro-standard/assets/scss/core/variables-pro';

.example-class {
    background-color: $primary-color;

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 8.8.0
  • Device: pc
  • Browser: chrome
  • OS: windows
  • Provided sample code: No
  • Provided link: No