Topic: CSS splitting not working
januszveiro asked 3 years ago
When importing even a single component, for example: import { MDBBtn} from 'mdbreact';
All CSS chunks are imported, for example: table.mdb-dataTable tbody > tr.selected, table.mdb-dataTable tbody > tr > .selected { background-color: #f5f5f5; } and more of the dataTable css
Expected behavior: Only the CSS belonging to imported components should be imported.
Krzysztof Wilk staff answered 3 years ago
Hi!
In the MDB4 we do not support such a feature. To achieve that we recommend:
- Using scss instead of CSS (where you can import styles you need): https://mdbootstrap.com/docs/react/getting-started/installation/#sass
- Using theming in MDB5 package (only available with pro components): https://mdbootstrap.com/docs/b5/react/content-styles/theme/
Keep coding!
januszveiro answered 3 years ago
Hi Krzysztof,
Thank you!
BTW, is MDB4 React still supported? A few people are waiting for this PR to be merged: https://github.com/mdbootstrap/mdb4-react-ui-kit/pull/17
Krzysztof Wilk staff commented 3 years ago
Yes, we still support this product and have a fix release planned already :)
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Free
- Premium support: No
- Technology: MDB React
- MDB Version: MDB4 5.1.0
- Device: not important
- Browser: not important
- OS: not important
- Provided sample code: No
- Provided link: No