Forums

  • # December 18, 2012 at 8:52 pm

    Hi all,

    I’ve been working on a css ribbon using gradients instead of a border with pseudo elements, but I’ve come across something I just can’t get around. If you get the chance, [take a look at this pen I put together](http://codepen.io/ChrisPlz/pen/opxIj “”), in both Firefox and Chrome browsers. The issue I’m having is with the :after pseudo element. No matter how I adjust the degree of the gradient, or swap out the order of the colors, I can only seem to get it right on one browser or the other. Any suggestions?

    # December 18, 2012 at 9:04 pm

    Setting :after’s gradient at 135deg works for me. (Chrome & Firefox). Can you take a screenshot of what you’re looking to achieve? I might be thinking you’re aiming for something you’re not.

    # December 18, 2012 at 9:20 pm

    are you using the latest Firefox?

    # December 18, 2012 at 9:23 pm

    Works on OS X 10.8.2 with FF 17.0.1

    # December 18, 2012 at 10:10 pm

    @ChrisP – I think it’s just one of those shrug moments really, the code is fine so from what I can see it’s a browser bug, unless someone can see something I can’t?

    While not exactly an ideal fix, maybe an image/svg fallback as a solution?

    # December 19, 2012 at 9:08 am

    Very odd indeed. Though it’s a tad bit more code, you could just add the -moz- prefix after your `@include`, as such:

    &:after {
    @include background-image(linear-gradient(-45deg, darkgreen, green 50%, transparent 50%));
    background-image: -moz-linear-gradient(-45deg, darkgreen, green 50%, transparent 50%);
    right: 0;
    }

    It will do the trick for Firefox, only thing I can think of really.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

icon-anchoricon-closeicon-emailicon-linkicon-logo-staricon-menuicon-nav-guideicon-searchicon-staricon-tag