nib icon indicating copy to clipboard operation
nib copied to clipboard

Use filter fallback for rgba values in =<IE8

Open jokull opened this issue 12 years ago • 6 comments

progid:DXImageTransform.Microsoft.gradient with the same #RRGGBBAA value can act as a fallback for browser that do not support rgba values.

Is this a good idea?

See this article http://css-tricks.com/rgba-browser-support/

jokull avatar Feb 06 '12 12:02 jokull

hmm, we have a thing called color-image() for similar cases https://github.com/visionmedia/nib/blob/master/lib/nib/color-image.styl#L2 producing a data uri however I suppose for older browsers that wont work either

tj avatar Feb 06 '12 16:02 tj

Did a bit of testing on this hack and it's not very reliable.

jokull avatar Feb 06 '12 17:02 jokull

I've created the following mixin for achieving this - it's pretty clunky as I had to rebuild the hex code from rgb to get it playing nicely with the ms filter. https://gist.github.com/1769124

hellosmithy avatar Feb 08 '12 13:02 hellosmithy

@jokull What was the problem? We've got code that looks like this that has worked for us:

    background: -moz-linear-gradient(top, #fff, #d1d1d1);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0.00, #fff), color-stop(1.00, #d1d1d1));
    filter: progid:DXImageTransform.Microsoft.gradient(Enabled='true',StartColorStr=#ffffffff, EndColorStr=#ffd1d1d1, GradientType=0);

Would be nice if nib figured this out for us.

asuth avatar Feb 17 '12 23:02 asuth

We didn't test it fully enough, just had some warning signs that it might not be solid enough. But I suppose if it works for @benmohu and @asuth we should reopen no?

jokull avatar Feb 18 '12 18:02 jokull

ya, :+1: to re-open.

asuth avatar Mar 08 '12 19:03 asuth