Although TextMate comes with a built in CSS validation command it would sometimes fail for me depending on where I was working from (some locations have proxy software on the main router). I rewrote the command in the style of the PHP-HTML validator I posted earlier. You can add more validation options using


. I’ve only used this script on CSS only files, it might not work on inline CSS in HTML documents.

#!/usr/bin/env ruby -wKU

scope =
scope.gsub!(/< \/?style.*?>/, '')

open('|curl -sF file=@-\;type=text/css -F lang=en', 'r+') do |io|
io < < scope

while io.gets
$_.gsub!(/<\/title>/, '\&')
print $_

Average Rating: 4.6 out of 5 based on 210 user reviews.

0 Response to “”

  • No Comments

Leave a Reply