Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Unused CSS Wordpress Questions

Hello HackForums, Deployed Here

I am currently removing unused css from all of my source files over at WordPress; but had a thought..

Is manually removing the Unused CSS from Plugin CSS files redundant? As in the case they will just "revert" upon updating that plugin?

- Deployed


EDIT: This may need to be in the wordpress section
(Mar 5, 2020 01:20 PM)Deployed Wrote:  Hello HackForums, Deployed Here

I am currently removing unused css from all of my source files over at WordPress; but had a thought..

Is manually removing the Unused CSS from Plugin CSS files redundant? As in the case they will just "revert" upon updating that plugin?


EDIT: This may need to be in the wordpress section
You answered your own question. If the update implements new CSS, then it will just put the removed styles right back where they were.
Je t'aime
[Image: fpZ5a5g.png]
(Apr 22, 2022 04:39 PM)-Scrub Wrote:  Jokes on you, I'm not smart enough to know what he's talking about.
(Mar 5, 2020 01:52 PM)Nachfolger Wrote:  You answered your own question. If the update implements new CSS, then it will just put the removed styles right back where they were.

I figured as much and wanted to verify. Thank you for that

- Deployed
(Mar 5, 2020 01:20 PM)Deployed Wrote:  
Hello HackForums, Deployed Here

I am currently removing unused css from all of my source files over at WordPress; but had a thought..

Is manually removing the Unused CSS from Plugin CSS files redundant? As in the case they will just "revert" upon updating that plugin?

 - Deployed


EDIT: This may need to be in the wordpress section

It depends on how you do it. If you're editing the CSS of the plugin directly, then yeah, you need to be cautious about updating the plugin. Your changes are likely to be overwritten.

There are more permanent, slightly more future-proof ways of doing this. Including reading through your plugins, ensuring they properly enqueue their styles, and via your functions.php file, dequeue them. You would then have to bring the CSS you're keeping from the plugin to your theme. But, if the plugin updates and makes changes to the markup generated, or classes applied to the markup, then you'll need to adjust.

Long story short, the unfortunate truth of WordPress websites is that they are prone to this kind of bloat. Until WordPress implements a far more robust assets pipeline there's little hope for truly streamlining CSS brought in by plugins. Other than minimizing how many plugins you use, of course.
<Disease />
(Mar 28, 2020 05:30 PM)Disease Wrote:  It depends on how you do it.  If you're editing the CSS of the plugin directly, then yeah, you need to be cautious about updating the plugin.  Your changes are likely to be overwritten.

There are more permanent, slightly more future-proof ways of doing this.  Including reading through your plugins, ensuring they properly enqueue their styles, and via your functions.php file, dequeue them.  You would then have to bring the CSS you're keeping from the plugin to your theme.  But, if the plugin updates and makes changes to the markup generated, or classes applied to the markup, then you'll need to adjust.

Long story short, the unfortunate truth of WordPress websites is that they are prone to this kind of bloat.  Until WordPress implements a far more robust assets pipeline there's little hope for truly streamlining CSS brought in by plugins.  Other than minimizing how many plugins you use, of course.

Very very late response, but I appreciate it nevertheless. This is exactly what I was intending, and acknowledge is the downside with Wordpress; as you just wait for plugin hosters to revise their own CSS. This is when you just snag a CDN and call it equal (as I have done since)

- Deployed


Possibly Related Threads...
Thread / Author Replies Views Last Post
by routesetterAug 12, 2025 08:23 AM 0 125 Aug 12, 2025 08:23 AM
Last Post: routesetter
by SIM-2090815Jul 11, 2018 09:45 PM 9 256 Jul 11, 2018 09:45 PM
Last Post: Megatron
by shookyJul 24, 2017 04:04 AM 7 192 Jul 24, 2017 04:04 AM
Last Post: icmp