Created
August 16, 2012 02:14
Revisions
-
toolness created this gist
Aug 16, 2012 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ (function(jQuery) { var $ = jQuery; function test(name, selectors, css) { console.log("CSS test: " + name); selectors.forEach(function(selector) { var passed = 0; var elements = $(selector); if (!elements.length) return console.error(" FAIL - nothing matches " + selector); elements.each(function() { var $el = $(this); for (var property in css) { var value = $el.css(property); if (!value.match(css[property])) return console.error(" FAIL - " + selector + " " + property + " is " + value + ", not " + css[property]); } passed++; }); if (elements.length == passed) console.log(" OK - " + selector + " (" + passed + ")"); }); } test("font is Ubuntu Mono", [ ".CodeMirror", ".CodeMirror-lines", ".CodeMirror textarea", ".CodeMirror-gutter-text", ".cm-s-jsbin span.cm-comment" ], { 'font-family': /Ubuntu Mono/ }); })(jQuery);