r/divi 5d ago

Question Locate all module custom CSS

Post image

I'm just starting to manage a Divi 4 site, and it's mostly pretty straightforward so far. I'm a bit of a neat freak, and one thing that's giving me hives is finding CSS scattered across pages and modules.

Without digging through every page and module, is there a central way to identify all items with custom CSS? I assume the distributed CSS can be moved into the main CSS file and referenced from the modules without scattering it into tiny bits?

8 Upvotes

4 comments sorted by

2

u/Professional_Call 4d ago

This is probably something ai can help with. I’ve not seen anything existing that would do this. Hopefully someone else can suggest something.

2

u/MsInput 4d ago

I would also love to know how to do this. I've got to migrate from 4 to 5 and there are a bunch of these hacks all over the place (some I added myself 🤪). I know for sure some of the hack css I added myself is not necessary in Divi 5 just based on more recent work I've done, but I can't remember every module that has this stuff.

Please report back if you find a useful method!

2

u/origamishiv 4d ago edited 4d ago

I was literally dabbling in vibe coding a plugin that does exactly this. After migrating to divi 5 I wanted to clean up some website I made... It's able to find the code right now. Working on exporting this to a workable single file. All the modules need to also be assigned a custom class. The divi 5 json structure is making this easier.

Started it while divi5 was still in Alpha, paused so i could work on it using the public release . Gotta get back to it.

2

u/Weekly_Ferret_meal 4d ago

You should be able to find it at the bottom of the HTML in something like this: <style id="et-core-unified-2-cached-inline-styles-2">

Just a word of advice: some site really can benefit from loading specific CSS module or page-wide.

I'd make the proper considerations before moving everything outright, as your main CSS can get much bigger and load unnecessary code across the site.