Created
May 16, 2012 13:32
-
-
Save Capncavedan/2710353 to your computer and use it in GitHub Desktop.
Ruby CSS validator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rubygems' | |
| require 'w3c_validators' | |
| validator = W3CValidators::CSSValidator.new | |
| validator.set_profile!(:css2) | |
| fp = '/path/to/cssfile.css' | |
| results = validator.validate_file(fp) | |
| puts results.errors | |
| puts results.warnings.size |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment