📜 ⬆️ ⬇️

CSS Tidy: need help

CSS Tidy is completely open and is currently one of the most powerful libraries for converting CSS code. In most cases, it is used to minimize CSS-code (which allows you to achieve very impressive results , an example from the site CSS Tidy ). A huge number of sites offer minimizers based on CSS Tidy: CleanCSS , CSS Formatter and Optimizer , CSS Compressot and many others. Even YUI Compressor a year ago, inferior to CSS Tidy compression ratio.

Preamble


The number of CSS Tidy settings is impressive: it is the compression of property names (colors, fonts, background), and case-independent output, and the union of selectors to minimize code, and their sorting, and the exclusion of non-standard CSS properties, and the syntax of the entered code, etc. ( full list of supported settings with examples ).

Since the library is aimed at parsing and standardization (as the name implies - Tidy), and not only at minimizing the code, it can be used to turn quite curious things. For example, output CSS code in standard format in any format (CSS Tidy supports output templates ). Or carry out any transformation with the style sheet on the page (by the way, it is used to create CSS Sprites and, of course, in the application for automatic client optimization - Web Optimizer ). Web Optimizer already includes the latest version of CSS Tidy, which fixes some bugs.
')
Since the application is written with high performance requirements, it works very fast (several times faster than the same YUI Compressor).

But it's not really about that.

Ambula


At the moment ( as written in Wikipedia ) the author (Florian Schmitz) is looking for people who could carry on the project further. The PHP part of the library is not that complicated, and I deal with it on my own. But problems arose when necessary in parallel to support the Win32 version (CPP). A quick glance at the current composition of the files didn’t tell me anything, so I ask the community for help and, in turn, I am looking for people who could keep the CPP branch up to date. For example, the current list of files in it:

  Sconscript
	 background.cpp
	 background.hpp
	 conversions.cpp
	 conversions.hpp
	 cssopt.cpp
	 cssopt.hpp
	 csspp_globals.cpp
	 csspp_globals.hpp
	 csspp_private.h
	 csstidy.cpp
	 csstidy.hpp
	 datastruct.hpp
	 file_functions.cpp
	 file_functions.hpp
	 important.cpp
	 important.hpp
	 main.cpp
	 misc.cpp
	 misc.hpp
	 parse_css.cpp
	 parse_css.hpp
	 prepare.cpp
	 prepare.hpp
	 print_css.cpp
	 trim.cpp
	 trim.hpp
	 umap.cpp
	 umap.hpp
	 win32_resource.rc 


Conclusion


CSS Tidy two years "stuck" on version 1.3. I would very much like to move this library off the ground and continue its full development, because with the advent of CSS3 selectors this task becomes much more interesting.

If there are volunteers, you can write in the comments, private or using contacts . We will decide how to organize further work.

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


All Articles