How could one go about dynamically generating a shape like this in CSS3:
Ignore the borders, as the important aspects are:
- The gradient in the arrow body, and that the gradient lasts from the tip to the end of the arrow.
- The length of the square part will vary.
I tried the regular :after method of adding a triangle to the end of a div element, but I couldn’t get the gradient to span both the tip and the body properly.
Fiddle: http://jsfiddle.net/rtuY9/8/