0

I'm working on improving a Wordpress Theme. The CSS file is long 41500 lines, of which many selectors are not used, and nowaday Google has become very strict on waste of resources (old smartphones with 3G is the target).

enter image description here

By reading the CSS code I've realized that there is just on huge CSS for all the styles which can be chosen in the backend Admin section of the theme:

/* -------------------------------------------------------------------
  Style 1
----------------------------------------------------------------------  */

How should I proceed? I've read of Grunt, Webpack but I don't know them. Any suggestion?

Revious
  • 7,816
  • 31
  • 98
  • 147
  • Possible duplicate of [Extracting only the css used in a specific page](https://stackoverflow.com/questions/4867005) or [How can I extract only the used CSS on a given web page and have that combined into a separate style sheet?](https://stackoverflow.com/questions/24665885) – Amessihel Nov 22 '18 at 15:56
  • @Amessihel: thanks, I will read each of them and I will mark my question as duplicate in case you are right. – Revious Nov 22 '18 at 15:59
  • No, they are useful but speak of how to find the unused css. Not how to split the CSS in modules. – Revious Nov 22 '18 at 16:05

0 Answers0