W3C home > Mailing lists > Public > www-svg@w3.org > March 2000

Re: visible attribute

From: Chris Lilley <chris@w3.org>
Date: Wed, 08 Mar 2000 01:24:50 +0100
Message-ID: <38C59DD2.5AFD1EA8@w3.org>
To: Jon Ferraiolo <jferraio@Adobe.COM>
CC: "Arnold, Curt" <Curt.Arnold@hyprotech.com>, "'www-svg@w3.org'" <www-svg@w3.org>, "'svg-comments@w3.org'" <svg-comments@w3.org>


Jon Ferraiolo wrote:
> 
> Curt,
> Personally, I agree with your sentiments, but in the spirit of
> compatibility with other W3C efforts, SVG's ability to turn visibility
> on/off is a bit clunky. 

Or rich, depending on your point of view.

> Generally, it is sufficient for what people need to do.
> 
> SVG actually uses two properties defined in CSS2, either of which can be
> used to make an element appear/disappear:
> 
> 'display' - a value of 'none' causes the element to disappear (see
> http://www.w3.org/TR/SVG/styling.html#DisplayProperty)

More precisely, it causes that element (including all of its children) to
not appear in the result tree. Any properties set on child elements will
have no effect whatsoever, since there is nothing there to affect the
appearance of. This can be used as an optimisation by implementations.

> 'visibility' - a value of 'hidden' causes the element to disappear (see
> http://www.w3.org/TR/SVG/painting.html#VisibilityProperty)

Yes. the element appears in the result tree but is not visible. Child
elements can have their visibility set to a different value and will then
appear.

> In the world of using CSS formatting of textual-oriented languages such as
> HTML, these two properties have different meanings. 'display' causes an
> element to be hidden and not take up space. 'visibility' causes an element
> to be hidden, but it still uses up space in terms of CSS2 box model text
> layout.
> 
> In the world of SVG, there isn't a flow model, so these two attributes are
> not differentiated based on how they affect layout.

But they will have different effects further down the line, particularly
once DOM 3 starts defining a DOM on the result tree and it becomes possible
to manipulate a single view rather than all views at once. 

--
Chris
Received on Tuesday, 7 March 2000 19:24:45 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:18 GMT