Topic: scss mdb variables in scss of components

wandu-ar pro asked 4 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 }

Thanks!


Arkadiusz Idzikowski staff answered 4 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.

FREE CONSULTATION

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

Status

Answered

Specification of the issue

  • ForumUser: 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