Skip to content

Commit

Permalink
fix masks test so that it doesnt count firefox's SVG mask result.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed May 11, 2012
1 parent 2d3a32c commit 314ceda
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
7 changes: 3 additions & 4 deletions feature-detects/css-backgroundposition-fourvalues.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
*/

(function() {

var elem = document.createElement('a'),
eStyle = elem.style,
val = "right 10px bottom 10px";

Modernizr.addTest('bgpositionfourvalues', function(){
eStyle.cssText = "background-position: " + val + ";";
return (eStyle.backgroundPosition === val);
});
});

}());
12 changes: 6 additions & 6 deletions feature-detects/css-mask.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

// this tests passes for webkit's proprietary `-webkit-mask` feature
// as well as mozilla's implementation of `mask` for SVG
// www.webkit.org/blog/181/css-masks/
// developer.apple.com/library/safari/#documentation/InternetWeb/Conceptual/SafariVisualEffectsProgGuide/Masks/Masks.html

// http://www.webkit.org/blog/181/css-masks/
// http://developer.apple.com/library/safari/#documentation/InternetWeb/Conceptual/SafariVisualEffectsProgGuide/Masks/Masks.html
// it does not pass mozilla's implementation of `mask` for SVG

// https://developer.mozilla.org/en/CSS/mask
// https://developer.mozilla.org/En/Applying_SVG_effects_to_HTML_content
// developer.mozilla.org/en/CSS/mask
// developer.mozilla.org/En/Applying_SVG_effects_to_HTML_content

// Can combine with clippaths for awesomeness: http://generic.cx/for/webkit/test.html

Modernizr.addTest('cssmask', Modernizr.testAllProps('mask'));
Modernizr.addTest('cssmask', Modernizr.testAllProps('mask-repeat'));

1 comment on commit 314ceda

@Nexii-Malthus
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is actually broken.

testAllProps expects camel case variant.
Please update string to 'maskRepeat'.

Please sign in to comment.