Extract inline CSS from HTML and clear pages

I have a large collection (over 300) of C # ASP.NET * .aspx pages and * .ascx controls that are dotted with inline CSS styles. My task is to extract this style into a CSS file.

So, I'm looking for a tool to simplify the task of manually extracting these inline styles and replacing them with class = " operators .

Now I know that this is not an ideal solution, but any tool that could facilitate the task would be useful.

+3
source share
3 answers

No tool will write good CSS selectors for you, just like no tool can write good code for you. Yes, you can generate code from templates, but only for the most repetitive coding tasks. CSS is more art than science, and so the “automatic generation” will not produce good results.

Writing good, clean, lean, supported CSS requires a deep knowledge of the HTML markup, style and layout you are trying to achieve, and the ability to identify templates throughout the site, such as font, color, h1 headers, presentation of tabular data, etc., which are reused.

script CSS. , , - , css. . - , .

, , , , , . - CSS, , .

, , , , CSS .

CSS Zen Garden, , CSS, CSS !

+1

. , python - , , , , .

0

, style =... . , .

0

Source: https://habr.com/ru/post/1753660/


All Articles