|
|
|
|
|
by leeoniya
2652 days ago
|
|
yep, you need to keep a whitelist. i made a 10-liner plugin for css-obj (see my other comment) which i use to mark certain selectors with "!keep" which populates my per-page whitelists during initial css blob gen. if most of your classes are dynamically applied or most markup is missing then this type of tool is probably not for you, especially if you have no good way of html-ifying enough state variations to keep your whitelist managable. FWIW, i run an SSR'd ecommerce site (with modals and a quite a bit of other dynamic bits) and while whitelisting needs to be maintained, the resulting list is fewer than 30 items and basically static. the items are regex and some cover multiple/related selectors. an improvement to this project might be to add inline ignore rules like purgecss does. eg /* nodrop * / |
|