A while ago, I wrote another article here about the CSS3 gradients. At that time, you saw the browser support, the advantages of using them and their syntax.
So, what’s new since then? The CSS3 Webkit syntax, which was quite different than Mozilla at that time, has been updated!
Latest news
About a week ago, the WebKit dev team announced they were updating the CSS3 gradient support in the rendering engine.
The most important point of their announcement was the that they will bring the CSS3 Webkit syntax in line with Mozilla’s implementation. Pretty cool huh? Now, you will have less headache pain when you’ll use both rendering engines (Webkit and Gecko) gradients.
What about the old syntax?
Now, beside the old old -webkit-gradient
value, nightly WebKit builds include support for -webkit-linear-gradient
and -webkit-radial-gradient
.
No need to worry about the old syntax, it will still be supported.
We’ll maintain support for -webkit-gradient for the foreseeable future for all the existing content out there that uses it.
WebKit team assurances
Linear gradients
WebKit linear gradients.
Now
Check out the above Webkit updated syntax:
Radial gradients
Now
Check out the above Webkit updated syntax:
Pros
This syntax update has just pros, no cons! Why’s that?
- Less complexity
- No need to search for online CSS3 gradients generators anymore. The syntax is similar across browsers and you can make the translation easier.
Conclusion
Still not using CSS3 gradients for your website? What are you waiting for?