On 7/19/05, Holger Will <[EMAIL PROTECTED]> wrote:
> Bart schrieb:
> 
> > Hey all,
> >
> > Does anyone know wheter it is possible to alter/set a CSS class'
> > contents to change the styling of all elements that use that class?
> > I would like to alter the stroke width on many d's, and it seemed it
> > would be easiest to set a single class and alter that instead of
> > walking the entire svg file with the DOM and setting attributes.
> >
> 
> hi bart
> yes and no, yes you can edit the style definition of a class or other
> selector, but no that will not cause any visible change.
> you need to walk the whole dom and reapply the classes on all elements.
> the best thing i think is to use inheritance where ever possible.

You're saying I need to both change the class and walk the DOM?
Thing is, I want to calculate that width every zoom.
So what's the code for changing the class definition?

Souds workable. So assuming I have only d's, eg.  
  g.regular d { stroke-width:1 }
  g.highlit d  { stroke-width:3 }
in the css, and setAttributing the class on the g's, I suppose.


Thanks,
--Bart


-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to