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

gradient detection requires old gradient syntax #1621

Closed
dbaron opened this Issue Jul 27, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@dbaron
Contributor

dbaron commented Jul 27, 2015

As reported in https://bugzilla.mozilla.org/show_bug.cgi?id=1176496#c22 , Modernizr's gradient detection depends on the old gradient syntax. Its attempt to detect unprefixed gradients fails because it's testing legacy syntax that's only supported in prefixed form. This means that if browsers ever remove prefixed gradients (which is seeming increasingly unlikely due to things like this), Modernizr will report that gradients are not supported.

Gradient syntax is described in https://drafts.csswg.org/css-images/#linear-gradients , and requires "to left top" rather than just "left top" in https://github.com/Modernizr/Modernizr/blob/master/feature-detects/css/gradients.js#L29

@karlcow

This comment has been minimized.

Show comment
Hide comment
@karlcow

karlcow Jul 28, 2015

And the cross rendering test

  1. Firefox Gecko 42.0a1 (2015-07-27)
  2. Opera Blink 31.0.1889.92 (aka Chrome/44.0.2403.89)
  3. Safari WebKit Version 8.0.7 (10600.7.12)

capture d ecran 2015-07-28 a 09 05 24

karlcow commented Jul 28, 2015

And the cross rendering test

  1. Firefox Gecko 42.0a1 (2015-07-27)
  2. Opera Blink 31.0.1889.92 (aka Chrome/44.0.2403.89)
  3. Safari WebKit Version 8.0.7 (10600.7.12)

capture d ecran 2015-07-28 a 09 05 24

@paulirish paulirish closed this in #1622 Oct 20, 2015

paulirish added a commit that referenced this issue Oct 20, 2015

Merge pull request #1622 from TRowbotham/master
Fix detecting unprefixed gradients. fixes #1621
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment