Extracting only the css used in a specific page

前端 未结 15 1978
难免孤独
难免孤独 2020-12-04 06:51

Say you had a dynamically generated site that has been worked on by too many people, past and present, and you now have a collection of shared stylesheets that contain over

15条回答
  •  -上瘾入骨i
    2020-12-04 07:39

    Try using this tool,which is just a simple js script https://github.com/shashwatsahai/CSSExtractor/ This tool helps in getting the CSS from a specific page listing all sources for active styles and save it to a JSON with source as key and rules as value. It loads all the CSS from the href links and tells all the styles applied from them. You can save the output in a JSON file with any name.

提交回复
热议问题