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

csstransform3d detect should prefer css conditionals - fixes #1512 #1513

Merged
merged 1 commit into from
Feb 5, 2015

Conversation

jacobrossi
Copy link
Contributor

This fixes #1512
There's several ways this could be done. This looked cleanest to me.

The root cause is that EdgeHTML looks a lot like webkit now. So it falls through the existing double-check for a old webkit bug (referenced in the code comments, also see #15) where css 3d transforms were sometimes not correctly detected due to GPU acceleration.

However, that double-check relies on the non-standard [at]media(transform-3d) media query. We've been discussing this with the W3C and consensus is that this media query should go away from browsers, but that's contingent on updating content relying on it (including Modernizr).

Context: http://lists.w3.org/Archives/Public/www-style/2014Oct/0390.html and https://code.google.com/p/chromium/issues/detail?id=426644

So my proposed fix here is to prefer the standardized CSS supports detection mechanism and only fall back to the [at]media rule when CSS at supports isn't available.

I've tested and validated this on IE (6-11 doc modes), Spartan, Chrome, Firefox, Opera (blink-based), and Safari (Mac and iOS).

Note that this fix won't work in the latest public EdgeHTML preview builds quite yet still because it doesn't have [at]supports. But I have special builds. :-) Coming soon to public preview builds.

@patrickkettner
Copy link
Member

looks awesome, @jacobrossi!

only issue issue is we should be importing the existing supports check (add test/css/supports to the require statement), and then key off of Modernizr.supports, rather than having a separate detect.

@jacobrossi
Copy link
Contributor Author

Ah yes, that makes sense. Done!

@patrickkettner
Copy link
Member

@jacobrossi any chance you could squish down the commits to just one?

cheers!

…r#1512

Use Modernizr detect for supports in transforms3d
@jacobrossi jacobrossi force-pushed the transforms3d-atmedia branch from d05571d to 75dd97a Compare February 5, 2015 03:25
@jacobrossi
Copy link
Contributor Author

Yep, no problem.

patrickkettner added a commit that referenced this pull request Feb 5, 2015
csstransform3d detect should prefer css conditionals - fixes #1512
@patrickkettner patrickkettner merged commit a4e4103 into Modernizr:master Feb 5, 2015
@patrickkettner
Copy link
Member

beautiful work, @jacobrossi

patrickkettner added a commit to patrickkettner/Modernizr that referenced this pull request Feb 22, 2015
csstransform3d detect should prefer css conditionals - fixes Modernizr#1512
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IE/Spartan EdgeHTML engine fails CSSTransforms3d detection
2 participants