Skip to content

Commit

Permalink
Fixing hsla test for IE9. All other browsers map hsla to rgba interna…
Browse files Browse the repository at this point in the history
…lly, but IE9 does not. hattip to @Fyrd
  • Loading branch information
paulirish committed Jun 24, 2010
1 parent 8f51549 commit 1f9bff6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modernizr.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,12 @@ window.Modernizr = (function(window,doc,undefined){
};

tests[hsla] = function() {
// Same as rgba(), in fact, browsers re-map hsla() to rgba() internally
// Same as rgba(), in fact, browsers re-map hsla() to rgba() internally..
// except IE9 who retains it as hsla

set_css( background + '-color:hsla(120,40%,100%,.5)' );

return contains( m_style[backgroundColor], rgba );
return contains( m_style[backgroundColor], rgba ) || contains( m_style[backgroundColor], hsla );
};

tests[multiplebgs] = function() {
Expand Down

0 comments on commit 1f9bff6

Please sign in to comment.