W3C home > Mailing lists > Public > www-style@w3.org > April 2010

Re: Display

From: Brad Kemper <brad.kemper@gmail.com>
Date: Tue, 27 Apr 2010 15:26:16 -0700
Message-Id: <B74BE92C-F22C-4E5D-81C5-A96A61431E70@gmail.com>
To: Anton Prowse <prowse@moonhenge.net>
Cc: "www-style@w3.org" <www-style@w3.org>, Colt Antonio Pini <Colt.Pini@nau.edu>
On Apr 27, 2010, at 2:55 PM, Anton Prowse <prowse@moonhenge.net> wrote:

> It's just occurred to me what the actual context of your original
> request was!
>> It seems the convention to show / hide a validation tag is to  
>> change the inline style from display:none; to display:inline;
>>    .form li > label span[style*="inline"] {
>>        display: block !important;
>>        }
> You're talking about form validation, in particular the marker which
> indicates whether a form field entry was valid according some  
> criterion,
> right?
> The way you described it, it sounds like this marker is present in the
> bare document, and that you're relying on CSS to hide it most of the
> time, and then using JS to unhide it when invalid input has been  
> entered.

I'm guessing it is worse than that; that the span is getting its style  
attribute changed at the server based on validation that takes place  
at the server. I see that sort of thing often in .NET generated forms.  
It would be better to have it generate a class instead (such as  
class='invalid'), and then use a style sheet to add the marker or  
change the color, etc. 
Received on Tuesday, 27 April 2010 22:27:11 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:34 UTC