Topic: Accessing media-breakpoint... issue
xdon82 free asked 5 years ago
*_Expected behavior_*I want those lines below(example) working
@include media-breakpoint-only(xs) { ... }
@include media-breakpoint-only(sm) { ... }
@include media-breakpoint-only(md) { ... }
@include media-breakpoint-only(lg) { ... }
@include media-breakpoint-only(xl) { ... }
*_Actual behavior_*Actually media-breakpoint-...... can't be found. I've managed to make it working by entering following lines of code
@import "../node_modules/mdbootstrap/scss/core/bootstrap/functions";
@import "../node_modules/mdbootstrap/scss/core/bootstrap/variables";
@import "../node_modules/mdbootstrap/scss/core/colors";
@import "../node_modules/mdbootstrap/scss/core/variables";
@import "../node_modules/mdbootstrap/scss/core/mixins";
But i'm not sure if this is good idea, can it be done in other more professional way?
Resources (screenshots, code snippets etc.)(look above)
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Opened
- ForumUser: Free
- Premium support: No
- Technology: MDB Vue
- MDB Version: 5.8.2
- Device: pc
- Browser: chrom, chromium edge
- OS: win10
- Provided sample code: No
- Provided link: No
Magdalena Dembna staff commented 5 years ago
Our package imports only
css
files which are the product of thosescss
files compiled and that is the reason why the first snippet won't work. We can't encourage extracting scss from node modules and manipulating those because updating MDB package can be problematic. Just to be completely clear - you don't wish to overwrite our code, just use some mixins and variables? I'm afraid that in that case, the best practice would be to rewrite those elements on your project's level. Kind regards, Magdalena