XF 2.3 How to reduce Unused CSS?

To optimize the loading of CSS in the thread_view, I would like to prevent the loading of unused CSS from the core.less, attachments. less, etc.

Currently, all styles defined in these files are being loaded when thread_view is accessed as a result 70-86% of CSS is unused CSS.

My objective is to selectively load only the necessary CSS files that are relevant to the thread_view, thereby improving performance and efficiency specially on Mobile.

Could you please advise on how I can accomplish this?
Thank you.
 
We already do this to some extent and our CSS is not granular/modular enough to reduce it much further. However it's also a trade-off between reusability/cacheability and tends to be fairly trivial in practice. If your thread load times are bad it's usually due to something else (like ads, analytics, or embedded content).
 
Back
Top Bottom