I\'m trying to apply a gradient to a border, I thought it was as simple as doing this:
border-color: -moz-linear-gradient(top, #555555, #111111);
There is a nice css tricks article about this here: https://css-tricks.com/gradient-borders-in-css/
I was able to come up with a pretty simple, single element, solution to this using multiple backgrounds and the background-origin property.
.wrapper {
background: linear-gradient(#222, #222),
linear-gradient(to right, red, purple);
background-origin: padding-box, border-box;
background-repeat: no-repeat; /* this is important */
border: 5px solid transparent;
}
The nice things about this approach are:
Check it out: https://codepen.io/AlexOverbeck/pen/axGQyv?editors=1100