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

CSS3: remove unneeded prefixes and small fixes to gradients #765

Merged
merged 1 commit into from Aug 14, 2012

Conversation

kristerkari
Copy link

Here are all changes listed:

These changes have been tested in:

  • Opera 12 Mac/Win
  • Safari 4 Win, Safari 5 Win, Safari 6 Mac
  • Retina iPad 5.1.1 Mobile Safari
  • iPhone 3g 4.2.1 Mobile Safari (old webkit gradient syntax)
  • Firefox 16 Mac (to test the unprefixed/W3C gradient syntax)

@mlettini
Copy link
Contributor

If you remove the 'top' from linear-gradient, don't you need to reverse the color gradient as well? Don't have IE10 on hand to double-check.

@kristerkari
Copy link
Author

@mlharvest Nope, you shouldn't need to reverse it if you drop top. Check the W3C example page I linked to, it has the same gradient written in different ways:

Below are various ways of specifying a basic vertical gradient:

linear-gradient(yellow, blue);
linear-gradient(to bottom, yellow, blue);
linear-gradient(180deg, yellow, blue);
linear-gradient(to top, blue, yellow);
linear-gradient(to bottom, yellow 0%, blue 100%);

@kristerkari
Copy link
Author

Also from MDN:

/* The old syntax, deprecated, but still needed, prefixed, for Opera and WebKit-based browsers */
background: -prefix-linear-gradient(top, blue, white); 

/* The new syntax needed by standard-compliant browsers (IE 10 and Firefox 10 onwards), without prefix */
background: linear-gradient(to bottom, blue, white);

@mlettini
Copy link
Contributor

Cool, +1 then. Will merge.

mlettini pushed a commit that referenced this pull request Aug 14, 2012
CSS3: remove unneeded prefixes and small fixes to gradients
@mlettini mlettini merged commit 2e09d33 into harvesthq:master Aug 14, 2012
@kristerkari
Copy link
Author

just FYI, I've now also tested this code with IE10 and CSS3 gradients work just fine.

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.

None yet

2 participants