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

RE: Display

From: Colt Antonio Pini <Colt.Pini@nau.edu>
Date: Tue, 27 Apr 2010 15:41:32 -0700
To: Brad Kemper <brad.kemper@gmail.com>
CC: "www-style@w3.org" <www-style@w3.org>
Message-ID: <786443B5C7E00948B25B7C9C5CADAF8304E3351231@NAUFLG-CMS1.nau.froot.nau.edu>
I agree with both of you, dom and class are great ways to deal with this but, it is Microsoft we are dealing with :).

And it is getting off topic, but thank you all for the responses. I am learning a lot from it. Maybe in the future I will be able to contribute!

Colt

-----Original Message-----
From: Brad Kemper [mailto:brad.kemper@gmail.com] 
Sent: Tuesday, April 27, 2010 3:26 PM
To: Anton Prowse
Cc: www-style@w3.org; Colt Antonio Pini
Subject: Re: Display

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:43:27 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:26 GMT