scss mdb variables in scss of components

web
mobile

Topic: scss mdb variables in scss of components

wandu-ar pro premium asked 7 months 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 7 months 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.
Status

Answered

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