Re: Interaction with invisible elements

At 0:11 +0000 3/2/01, Tim Bagot wrote:

><http://www.w3.org/TR/REC-CSS2/visufx.html#visibility> says: "The
>'visibility' property specifies whether the boxes generated by an element
>are rendered." In particular, not "the content of the boxes...".

    But does a lack of rendering equal a lack of existence?  (Or, if 
an element is drawn in the forest and nobody is around to see it...)

>This
>suggests to me that hidden elements affect layout only; for all other
>purposes the boxes do not exist, and so there cannot be any link to be
>selected. Furthermore, this behaviour is absolutely necessary if links on
>revealed boxes with lower z-index(es) are to behave correctly.

    Interesting point.  I'm still not convinced, though.  It seems to 
me that if an element takes up space in the document layout, it has 
an existence.  Effectively, I see no difference-- either visual or 
structural-- between 'visibility: hidden' and 'opacity: 0'.  And if 
an element is available for interaction from 'opacity: 1' down 
through 'opacity: 0.00000001' then I don't think interaction should 
suddenly be prevented when the opacity then drops to '0'.  Thus, the 
same would hold true for hidden elements.

>What you /could/ do is make a link with no content, and suggest suitable
>padding, a transparent background, and no borders, text decoration,
>generated content, etc. I think this ought to work.

    True.  Not that I really plan to do this either way.  I was just 
playing with ideas in my head, and this one occurred to me.  I was 
sufficiently intrigued to test it, and thus my question.

>I feel that the topmost
>and only the topmost box should be available for interaction (where "box"
>should include padding and possibly borders, but not margins), just as if
>it were possible to set 'color: transparent'.

    I can agree with your topmost argument, as long as we're talking 
about a case where the same pixel (in screen media) could represent 
more than one element.  But assume a case where two hyperlinks are 
partially overlapped, so that they render something like this:

    some overLAPland

...where the text of the links is "some overlap" and "lapland" 
(apologies to any Sami readers) and the capitalized letters denotes 
the overlap.  Whichever link is on top should be the one which 
operates in the "LAP" portion, but this wouldn't kill off the rest of 
the link on the bottom.
    But anyway, this to me doesn't really address the point I raised. 
If an invisible element is topmost in its area, then the lack of box 
rendering doesn't necessitate a lack of interaction.  It could be 
decided that this is how it should work, but I don't think the 
specification is clear on the point.  I also think that invisible 
(topmost) elements should be available for interaction, unless 
someone can show me why that would be a bad thing.

--
Eric A. Meyer (eric@meyerweb.com)   http://www.meyerweb.com/eric/
Author, "CSS: The Definitive Guide" http://www.oreilly.com/catalog/css/
Editor, Style Sheets Ref. Guide     http://style.webreview.com/
Coordinator, W3C CSS Test Suite     http://www.w3.org/Style/CSS/Test/

Received on Friday, 2 March 2001 13:34:48 UTC