Answer the question
In order to leave comments, you need to log in
How to remove extra styles from Bootstrap 4 and reduce css size?
Minimum experience. I'm trying to make a project in laravel. To build the frontend, I use bootstrap 4.
I want to achieve the highest possible site loading speed.
1. Is there any algorithm that will help to throw out extra styles from bootstrap 4 that are not currently used in the project?
There are no more than 10 different page templates on the site.
2. Can it be automated?
With the development of the project, more standard bootsrap will be used, new page templates will appear. Is it possible to somehow automatically get a new truncated and compressed css?
In which direction should you dig?
Answer the question
In order to leave comments, you need to log in
The easiest and most concrete way IMHO is to clean up unused CSS at the production build stage:
https://www.npmjs.com/package/postcss-remove-unused-css
https://github.com/uncss/postcss-uncss
https:/ /www.purgecss.com/with-postcss
etc
Custom Bootstrap 4 scsss? there is no reception against scrap
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question