Think of the <text> element akin to the <p> element in HTML. Yes, fairly often you will simply pass a string to it, but it needing lower level styling is pretty common.
For the API you proposed, what would happen if you passed in both a non-empty list of svgs and a string? RE: strokeWidth - that's a bug, the attribute is actually called stroke-width <https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-width>. On Tuesday, 18 April 2017 12:08:23 UTC+1, Rupert Smith wrote: > > On Tuesday, April 18, 2017 at 10:59:20 AM UTC+1, Jakub Hampl wrote: >> >> >> https://developer.mozilla.org/en-US/docs/Web/SVG/Element#Text_content_elements >> >> <text> elements can contain quite a number of children that allow you to >> do very precise formatting of the actual text content. There are plenty of >> usecases like custom fonts, rendering text on a path, text effects, etc. >> > > Yes. I suspected this might be the case. > > Perhaps it is more often the case than the simple situation of inserting a > <text>hello</text> is? > > How about this for the signature for a text node: > > text : List (Attribute msg) -> List (Svg msg) -> String -> Svg msg > > Lets you specify the actual text as a String, and you can supply empty > lists if you don't need any attributes or other Svg elements? > -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
