Topic: Standalone SCSS transpile (FYI)
Flub premium asked 4 weeks ago
Would be better SCSS could transpile regardless of Angular project (FYI)
My project loads css dynamically because I need to be able to switch between skins. Therefore, I have seperate styling folders for these skins. To use a user-chosen skin, I add a link tag to the head, as such, I don't use the regular Angular styles.scss.
After an upgrade to MDB5 3.0, I had some layout issues (Full-screen-width dropdowns... ) After tracking down the problem, I found out the reason:
mdb-angular-ui-kit/assets/scss/mdb.scss contains the following lines:
@import '~@angular/cdk/overlay-prebuilt.css'; @import '~@angular/cdk/text-field-prebuilt.css';
Therefore transpiler cannot import those two files because tildes are package-manager related, not scss. I solved the problem doing this in my scss file:
@import "../node_modules/mdb-angular-ui-kit/assets/scss/mdb"; @import '../node_modules/@angular/cdk/overlay-prebuilt'; @import '../node_modules/@angular/cdk/text-field-prebuilt';
Should these two file imports not be outside of mdb.scss for better portability?
Thanks for reporting. We will discuss it in the team
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Premium
- Premium support: Yes
- Technology: MDB Angular
- MDB Version: MDB5 3.0.0
- Device: PC
- Browser: All
- OS: Windows 11
- Provided sample code: No
- Provided link: No