Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CSS Shapes test. #998

Merged
merged 1 commit into from
Jul 30, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Shape-inside's computed style now returns 6 parameters, since it incl…
…udes the x any y-axis radius of the rounded rectangles.

This change modifies the expected file to match with the new behavior.
  • Loading branch information
zhorvath committed Jul 18, 2013
commit 45122e175b82bf72e688cae868deb5ee29c8c162
4 changes: 2 additions & 2 deletions feature-detects/css/shapes.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ define(['Modernizr', 'createElement', 'docElement', 'prefixed', 'testStyles'], f

var shapeInsideProperty = prefixedProperty.replace(/([A-Z])/g, function (str, m1) { return '-' + m1.toLowerCase(); }).replace(/^ms-/, '-ms-');

return testStyles('#modernizr { ' + shapeInsideProperty + ':rectangle(0,0,0,0) }', function (elem) {
return testStyles('#modernizr { ' + shapeInsideProperty + ':rectangle(0,0,0,0,0,0) }', function (elem) {
// Check against computed value
var styleObj = window.getComputedStyle ? getComputedStyle(elem, null) : elem.currentStyle;
return styleObj[prefixed('shapeInside', docElement.style, false)] == 'rectangle(0px, 0px, 0px, 0px)';
return styleObj[prefixed('shapeInside', docElement.style, false)] == 'rectangle(0px, 0px, 0px, 0px, 0px, 0px)';
});
});
});