From: R H. <rha...@gm...> - 2014-07-21 16:40:07
|
On 21 July 2014 14:48, jamesramm <jam...@gm...> wrote: > You've just noted it: Line2D isn't a CSS selector CSS doesn't define any particular element names - it just operates on element names in a document tree. So a standard CSS parser will work just as well with "line2d { ... }" as it would with "h1 { ... }". On 21 July 2014 14:48, jamesramm <jam...@gm...> wrote: > ..likewise, the properties we want to call upon (like linewidth) are not > CSS attributes. Agreed - not all properties are standard CSS properties, so I was suggesting borrowing SVG properties to augment the list. NB. That would make the property controlling line width be called "stroke-width". But whatever names we choose, a CSS parser doesn't care what the names are. But really the issue is not so much about CSS and SVG-styling-properties - it is whether to use existing standards or not. Clearly I'm in favour of adopting standards. But perhaps there is another standard set of CSS styling properties which would be a closer match to matplotlib? Perhaps CSS is not the answer at all, and something like SLD/SE would be better? (I suspect not! But there could easily be other technologies I'm not aware of!) Axes { > gid: 'axes1'; > autoscalex_on: True; > ::ylabel { > text: 'Y-Axis'; > font-size: 10; > } > } > > I think this would be easier to parse and slightly clearer to read as it > can be 'attached' to the artist container it refers to (imagine if there > were 2 axes in a figure...) In the case of two Axes, the CSS version would be: Axes#axes1 { border: 1px solid black; } Axes#axes2 { border: 2px dashed green; } |