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
Question: Export list of used CSS rules?
Moderator: kfury77
Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
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;
Re: Question: Export list of used CSS rules?
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.
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
Re: Question: Export list of used CSS rules?
Thank you for getting back to me.
That's a pity. It would be helpful if I could copy the list from Code Explorer as plain text.Aivars wrote:Unfortunately there is no Export feature for Code Explorer.