Update master #631

Merged
merged 1 commit into from Jul 19, 2012

Conversation

Projects
None yet
4 participants
@urazkines
Contributor

urazkines commented Jul 12, 2012

Better CSS first-child detect.

- return elem.lastChild.offsetWidth > elem.firstChild.offsetWidth;
-}, 1);
+Modernizr.testStyles("#modernizr div {width:100px} #modernizr :last-child{width:200px;display:block}", function (elem) {
+ var lastchild = Modernizr.addTest('lastchild', elem.lastChild.offsetWidth > elem.firstChild.offsetWidth);

This comment has been minimized.

@paulirish

paulirish Jul 13, 2012

Member

why assign to the var at all?

@paulirish

paulirish Jul 13, 2012

Member

why assign to the var at all?

-}, 1);
+Modernizr.testStyles("#modernizr div {width:100px} #modernizr :last-child{width:200px;display:block}", function (elem) {
+ var lastchild = Modernizr.addTest('lastchild', elem.lastChild.offsetWidth > elem.firstChild.offsetWidth);
+}, 2);

This comment has been minimized.

@paulirish

paulirish Jul 13, 2012

Member

pretty sure we dont need the 2.
cc @ryanseddon

otherwise this looks good. thanks!

@paulirish

paulirish Jul 13, 2012

Member

pretty sure we dont need the 2.
cc @ryanseddon

otherwise this looks good. thanks!

This comment has been minimized.

@ryanseddon

ryanseddon Jul 14, 2012

Member

In the original pull request, #304, it was set to 1 because of the weird behaviour in safari 3 and down. So I assume it needs to be there for that reason.

@ryanseddon

ryanseddon Jul 14, 2012

Member

In the original pull request, #304, it was set to 1 because of the weird behaviour in safari 3 and down. So I assume it needs to be there for that reason.

@ryanseddon

This comment has been minimized.

Show comment
Hide comment
@ryanseddon

ryanseddon Jul 14, 2012

Member

I think for consistency the addTest method should be the parent around any other method calls. Unless you do this for a reason?

Member

ryanseddon commented Jul 14, 2012

I think for consistency the addTest method should be the parent around any other method calls. Unless you do this for a reason?

@iboozyvoozy

This comment has been minimized.

Show comment
Hide comment

ios safari

@paulirish

This comment has been minimized.

Show comment
Hide comment
@paulirish

paulirish Jul 19, 2012

Member

pulling. and i'm going to fix this up after.

Member

paulirish commented Jul 19, 2012

pulling. and i'm going to fix this up after.

paulirish added a commit that referenced this pull request Jul 19, 2012

@paulirish paulirish merged commit 34df7a3 into Modernizr:master Jul 19, 2012

paulirish added a commit that referenced this pull request Jul 19, 2012

patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this pull request Feb 22, 2015

patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this pull request Feb 22, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment