W3C home > Mailing lists > Public > public-svg-wg@w3.org > April to June 2012

Re: Styling of SVG 2.0

From: Cameron McCormack <cam@mcc.id.au>
Date: Sat, 26 May 2012 11:58:51 +1000
Message-ID: <4FC038DB.7090200@mcc.id.au>
To: Dirk Schulze <dschulze@adobe.com>
CC: SVG WG <public-svg-wg@w3.org>
Dirk Schulze:
> The current draft of SVG 2.0 makes use of the style sheet for CSS
> specs. I really facilitate it, but it also leads to some questions.
>
> The CSS WG has some style guidelines:
> http://www.w3.org/Style/spec-mark-up
>
> How much do we want to follow this guideline? I am not necessarily
> speaking about the short hands like: 'property' that gets transformed
> to <a class=property href="#text-indent">'property'</a>.
>
> I am more speaking about the formatting of elements, attributes,
> properties and values.
>
> Just elements and attributes have a certain styling. But the font
> size is smaller then the rest of the text and the font weight is
> bold. Both is not the case for CSS.

CSS also rarely talks about attributes and elements in prose, I guess.

> Values are surrounded by double quotes and sometimes bold but
> sometimes not. In CSS we have single quotes and blueish color, like
> for properties.

This is what I am currently doing, which is now a mix of the previous 
SVG 1.1 conventions and the new CSS conventions:

   * Element names are marked up with class="element-name", which makes
     them bold, red, smaller text, with round quotes around.

   * Attribute names are marked up with class="attr-name", which makes
     them bold, dark blue, smaller text, with round quotes around.

   * Property names are (now) marked up with class="property", which
     makes them paler blue, not bold, same size text, with round
     quotes around.

   * Attribute values are marked up with class="attr-value", which makes
     them black, bold, smaller text, with straight quotes around.  (That
     should perhaps change to round quotes.)

   * Property values are marked up with class="prop-value", which
     makes them black, bold, smaller text, but without straight quotes
     around.  I was thinking though to adopt the CSS formatting here for
     consistency.

I've been moving towards using the CSS property definition table 
styling, too.

> The blueish color differs between SVG and CSS.
>
> There are more differences, but in general I just want to know if we
> try to adapt our design to CSS3 as much as possible, or if we want to
> continue with the old SVG design.

I am reasonably happy with the current styling, and I like the 
distinction between elements/attributes/properties.  I am happy to align 
with the CSS spec formatting for CSS related things, but otherwise I 
like our more "unique" formatting. :)

(Our styling is also quite different from HTML, and ReSpec-generated 
specs, which tends to use orange <code> formatting for attribute and 
element names.)
Received on Saturday, 26 May 2012 01:59:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 26 May 2012 01:59:25 GMT