Question: Export list of used CSS rules?

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.

  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;

Question: Export list of used CSS rules?

Postby Anke77 » Thu Apr 28, 2022 11:38 am

Hi everybody,

I'm sure I'm far from having checked out all of HTMLPad's features and I can't seem to find a solution to my problem in the help files and forums.

I'm working with CSS frameworks and as we all know we're never applying all CSS rules defined in a framework. Thus I'd like to delete all unused rules in the CSS file(s).

HTMLPad's code explorer is listing all used classes quite nicely. Now I'm wondering if there is a way to print or export this list of all those classes used in a HTML document so that I can comfortably compare them with all rules contained in the CSS file(s) to delete those that are not being used. Or maybe one of you knows an alternative 'best practise'?

I'm using HTMLPad 2022 (v17.3.0.244)

Regards,
Anke
Anke77
 
Posts: 2
Joined: Thu Apr 28, 2022 11:15 am

Re: Question: Export list of used CSS rules?

Postby Aivars » Fri May 27, 2022 3:54 pm

Unfortunately there is no Export feature for Code Explorer.
I think the best way to do it is to go through the rules painstakingly. Sometimes it's not obvious whether the rule is used or not, sometimes the elements might not exist in HTML but can be dynamically created by client-side javascript. If you know your project well, you can remove the rules safely, but it has to be done carefully.
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2456
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Question: Export list of used CSS rules?

Postby Anke » Fri May 27, 2022 11:23 pm

Thank you for getting back to me.
Aivars wrote:Unfortunately there is no Export feature for Code Explorer.

That's a pity. It would be helpful if I could copy the list from Code Explorer as plain text.
Anke
 
Posts: 3
Joined: Tue Aug 27, 2019 10:58 pm
Location: Germany


Return to HTMLPad / Rapid CSS / Rapid PHP / WeBuilder Support

Who is online

Users browsing this forum: Google [Bot] and 11 guests