Find unused CSS

  

Hey there,

I am wondering if there is a way IN OutSystems to detect if there are unused CSS classes in a given Web Screen or ESpace.

I know there are browser add-ons, scripts, and so on that can do this, but this is not what I am asking about.

Thanks!

-S

Solution

Hello Spencer,

At the best length of my knowledge, no, there isn't.

Not in the Service Studio and not in the Service Center. I never found any option/function/dialog to do that.

And while I think this would be useful, I also think this would be very difficult to implement, at least to be 100% reliable, as a lot of CSS selectors can be used that make simply impossible or near impossible to automatically detected where they are being used, if for nothing else, because the place where they would apply can be generated dynamically, including using information from web services, files, etc that are not available in design time.

So, I think this will not happen in the near future...

Cheers

Eduardo Jauch

Solution

Hi Spencer,

Despite you specifically say "IN" and Eduardo already gave you the answer, i just like to add that the browser does that for you.

The latest version of chrome allows you to access the tab coverage where you can see from the downloaded files, which one and how much of each one of them was actually executed.

Please see below image:


Cheers,

Thanks Eduardo, that was basically what I was wondering.

Thanks as well Leonardo and Henrique. I tried to qualify my question so as to avoid those responses I am already aware of, but it's all good. Thanks anyway!