phpcssapicsstidy

Question about CSSTidy


In opposite to most other CSS parsers, no regular expressions are used and thus CSSTidy has full CSS2 support and a higher reliability.

I wonder why CSSTidy built their own parser and not utilized the official SAC API (which also includes support for the new CSS3)? Is there any technical or practical reason for not using SAC and writing your own parser? Infact, there're NO css tools right now that use SAC, I wonder why?


Solution

  • Tools like CSSTidy need to be able to handle the non-compliant code that shows up in the real world. Official standards implementations usually aren't very good at that.