Re: Set circle radius using CSS

David Woolley wrote:
>> Moreover, I would personally discourage you from using CSS with SVG at all,
>> if you can help it. CSS is not required for an implementation, it's not used
> 
> My impression is that CSS support was originally proposed as part of the
> token compliance to W3C accessibility requirements; it allows the user
> some ability to make pages more easily readable when they have colour and
> other visiou defects, but currently there doesn't seem any serious 
> interest in accessibilty.

This is a sensible explaination, although in a visual medium where text 
position and size is important (and hard to alter in SVG 1.1), using a 
different stylesheet to make, eg., text bigger would be problematic, 
with text overwritting other text, masking elements or going behind 
elements, etc.

The problem is that CSS has been abused, we often see:

<circle cx="50" cy="50" r="20"
     style="fill: lightblue; stroke: blue; stroke-width: 5;"/>

instead of:

<circle cx="50" cy="50" r="20"
     fill="lightblue" stroke="blue" stroke-width="5"/>

for no particular reason...

OTOH, CSS can be useful to define real styles with classes, ie. 
properties that can be applied to a great number of objects: this is a 
good shortcut, reducing size of SVG file, allowing to change the 
properties of a great number of similar objects at once.

Of course, this can be done without CSS too (except for cascading? which 
isn't used so much in SVG) using entities.

-- 
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --

Received on Saturday, 17 September 2005 07:41:58 UTC