css3please icon indicating copy to clipboard operation
css3please copied to clipboard

Addition of radial gradients?

Open bfintal opened this issue 14 years ago • 7 comments

Might be a good idea to add radial gradients to the current collection. No current support for Opera, FF < 3.6 and IE < 10 but how about just adding a fallback to linear gradients?

References:

  • collection of cross-browser linear and radial gradient examples: http://css-tricks.com/examples/CSS3Gradient/
  • -webkit- gradients: http://www.webkit.org/blog/1424/css3-gradients/
  • -mozilla- gradients: https://developer.mozilla.org/en/CSS/-moz-radial-gradient
  • -ms- radial gradient: http://msdn.microsoft.com/en-us/library/windows/apps/hh453718(v=vs.85).aspx

bfintal avatar Sep 22 '11 20:09 bfintal

i'd be happy to see radial in here.. if you or anyone file a pull request we can work with that

paulirish avatar Sep 22 '11 21:09 paulirish

I'll be on this right after I finish my current project!

bfintal avatar Oct 01 '11 15:10 bfintal

we need to add this in bros

niftylettuce avatar Mar 29 '12 00:03 niftylettuce

patches welcome. :)

paulirish avatar Mar 29 '12 16:03 paulirish

Very much needed!!!!

enriquemorenotent avatar Jul 17 '12 15:07 enriquemorenotent

example less mixin:

.radial(@innerColor: #555, @outerColor: #333)  {
    background-color: @outerColor;
    background-image: -webkit-gradient(radial, center center, 0, center center, 460, from(@innerColor), to(@outerColor));
    background-image: -webkit-radial-gradient(circle, @innerColor, @outerColor);
    background-image: -moz-radial-gradient(circle, @innerColor, @outerColor);
    background-image: -o-radial-gradient(circle, @innerColor, @outerColor);
    background-repeat: no-repeat;
}

niftylettuce avatar Oct 28 '12 20:10 niftylettuce

then for IE you use a div:

#ie-radial {
  position: absolute;
  background: #fff; /* color you want for gradient */
  top: 50%;
  left: 50%;
  margin-top: -100px;
  margin-left: -100px;
  filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100, finishopacity=0, style=2);
}

niftylettuce avatar Oct 28 '12 20:10 niftylettuce