- From: Robert Longson <longsonr@gmail.com>
- Date: Tue, 9 Feb 2010 16:29:40 +0000
- To: Jeff Schiller <codedread@gmail.com>
- Cc: www-svg@w3.org
- Message-ID: <31fc788d1002090829l39fb108ch19865f0618e86b25@mail.gmail.com>
Jeff, currentColor is inherited from its ancestors, in this case the marker, defs and outer svg elements where it isn't set, not its caller. Robert. On 9 February 2010 13:28, Jeff Schiller <codedread@gmail.com> wrote: > Hello Robert, > > Indeed, currentColor seems like it would meet part of the need: > > <svg xmlns="http://www.w3.org/2000/svg"> > <defs> > <marker refX="2" orient="auto" markerHeight="5" markerWidth="5" > markerUnits="strokeWidth" refY="5" id="arrow" viewBox="0 0 10 10"> > <path fill="currentColor" d="m10,0l-10,5l10,5l-5,-5l5,-5z"/> > </marker> > </defs> > <line marker-start="url(#arrow)" style="color:red" stroke-width="5" > stroke="red" y2="240" x2="293" y1="131" x1="123"/> > </svg> > > Should this give me a red marker? I could not get any browser to do > this, maybe it's a support thing? > > It seems that currentColor would also not address gradients, unless > style="color:url(#linearGradient1234)" is allowed. Is it? Didn't > seem to work for me. > > On the other hand, my own proposal doesn't really address how the > gradient should be painted in the marker w.r.t in the > objectBoundingBox case. I know what that should intuitively look > like, I just don't know how to specify it. > > Regards, > Jeff > > > On Tue, Feb 9, 2010 at 4:58 AM, Robert Longson <longsonr@gmail.com> wrote: > > Jeff, > > > > Can you get what you want with currentColor? > > http://www.w3.org/TR/css3-color/#currentcolor > > > > I believe display:marker was introduced as a value in CSS 2 but did not > make > > it to CSS 2.1 because of lacking browser support. I guess it should be > > removed from the SVG specification. > > > > Best regards > > > > Robert. > > >
Received on Tuesday, 9 February 2010 16:30:13 UTC