W3C home > Mailing lists > Public > www-style@w3.org > June 2008

Re: [CSS21] Addition of 2 values to the visibility property

From: Damian Vila <damianvila@gmail.com>
Date: Fri, 27 Jun 2008 00:43:05 +0200
Message-ID: <48641B79.7010000@gmail.com>
To: Simetrical <simetrical@gmail.com>
CC: www-style@w3.org

Simetrical escribió:
> On Thu, Jun 26, 2008 at 5:25 PM, Damian Vila <damianvila@gmail.com> wrote:
>   
>> CSS2 > Visual effects > Visibility
>>
>> Rationale: Right now one of the most common methods to replace text with and
>> image in an accessible way is to put the image as a background and indent
>> the text, as proposed by Mark Rundel of Phark
>> (http://phark.typepad.com/phark/2003/08/accessible_imag.html)
>> The idea behind this is to only show the background of the box while hiding
>> the foreground.
>>
>> The proposal is the addition of two new values to the visibility property in
>> CSS: foreground and background.
>>     
>
> There seem to be quite straightforward ways to do this already with
> other, well-established proposals.  The content property in CSS3
> should do a perfect job:
>
> http://www.w3.org/TR/2003/WD-css3-content-20030514/#content
>
> "content: inhibit" or 'content: ""' should serve just as well as your
> "visibility: background".  "visibility: foreground" appears equivalent
> simply to "background: none", possible in any browser that supports a
> CSS background in the first place.
>
> These solutions seem more intuitive to me, as well (but then, the
> visibility property always seemed a little odd to me, somehow).
>
>   
Well, I'm not really up-to-date with the work being done in CSS3, that's 
why I put the [CSS21] on the subject.

It's true that the same (apparent) thing to 'visibility:foreground' can 
be made with 'background:none', but they are conceptually different. For 
example, it's not the same to load a page and have one element with 
'backgound:none' than to load a page and have that same element with a 
background but the visibility set to 'foreground' (invisible 
background). In the first case you don't have a background at all, while 
on the second you just can't see the background (but effectively, it is 
there.) This could be used also to 'preload' backgrounds, for example.

Damian
Received on Thursday, 26 June 2008 22:43:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:07 GMT