Skip to content
forked from redroot/holmes

Holmes is stand-alone diagnostic CSS stylesheet that can highlight potentially invalid or erroneous HTML(5) markup by adding one class

Notifications You must be signed in to change notification settings

weaksauce/holmes

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

holmes.css - CSS Markup Detective

Holmes is stand-alone diagnostic CSS stylesheet that can highlight potentially invalid, inaccassible or erroneous HTML(5) markup by adding one class.

What does it cover?

The holmes.css file will display either an error (red outline), a warning (yellow outline), or a deprecated style (dark grey outline) for flags such as:

  • Missing required attributes on tags, such as alt tags on images (lots of these)
  • Deprecated and Non-W3C Elements - see [http://www.w3.org/TR/html5/obsolete.html#obsolete] (W3C.org's article on obselete tags)
  • Non-W3C Attributes - as above, just the most important ones since there are MANY

Beyond these three labels you must use some sort of inspector, such as Firebug, to determine the reason that an element has been flagged.

Why should I use it?

holmes.css is useful for checking the quality of your code (up to W3C HTML5 standards), nitpicking over ensuring markup is valid and semantic, and when you are tasked to fix up and debug an old, OLD website. It has a simple implementation and a mostly unobtrusive effect on your page. Not recommended for live enviroments.

Remember too that these are just guidelines: if something is flagged but you can't change it for a good reason, don't worry about it :) Also use a validator if you want to be 100% sure.

How do I use it?

Simply download a version of the CSS, minified or normal (with docs), and include a stylesheet link to it on your page. Or copy the contents into one of your own stylesheets. Then add the class "holmes-debug" to either your BODY or HTML tag, and you're set to go.

In terms of configuration, such as changing the flag colours: go nuts!

Browser Support

Works 100% in

  • Google Chrome 10+
  • Safari 5+
  • Opera 10+
  • Firefox 3.5+

Due to extensive use of the :not CSS3 selector, holmes.css does not function well in IE 8 and below, but it should (NB: not tested yet) work in Internet Explorer 9. Oh well.

Acknowledgments

Inspired by http://csswizardry.com/inuitcss/,[http://meyerweb.com/eric/tools/css/diagnostics/](Eric Meyer), [http://www.nealgrosskopf.com/tech/thread.php?pid=17](Neal Grosskopf) and procrastination from coursework!

Changelog

  • 27.04.11 - Changed the no title/empty title on anchor links to a warning level instead of a error level
  • 25.04.11 - Removed test for plaintext, even though it's still in the CSS file, since it BUTCHERED the rest of the testsuite page.

About

Holmes is stand-alone diagnostic CSS stylesheet that can highlight potentially invalid or erroneous HTML(5) markup by adding one class

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published