- From: Tantek Celik <tantek@cs.stanford.edu>
- Date: Fri, 22 Mar 2002 14:11:11 -0800
- To: "Stark, Peter N" <Peter.N.Stark@sonyericsson.com>, Chris Lilley <chris@w3.org>
- CC: <www-style@w3.org>
On 3/22/02 6:20 AM, "Stark, Peter N" <Peter.N.Stark@sonyericsson.com> wrote: > Chris, > Thanks for your answer. One question below: > > Chris wrote: >> >> On Friday, 22 March, 2002, 09:23:27, Peter wrote: >> >> SPN> I find no CSS3 property to put color on non-textual content such >> SPN> as form controls and list bullets. The 'color' property I think >> SPN> is for text content only. >> >> That is its definition, yes. That is why SVG moved from using the >> color property for graphical objects, to using its own fill and stroke >> properties. >> > > Would it be considered an error according to the CSS2 spec. if the following > generated red radio buttons? > > <input type="radio" style="color:red" /> > > After all, the following generates red text: > > <input type="text" style="color:red" /> <IMHO> No, it would not be an error. In fact, it could be considered one valid way of implementing the application of CSS to radio buttons and checkbox. Typical radio buttons (and a checkboxes for that matter) actually have areas that roughly correspond to the border, background and foreground, e.g. (*) - where the outer circle "( )" could be styled with the 'border' properties - and space inside outer circle could be filled in with the 'background' - and the dot "*" could be styled with the 'color' property Similarly for a checkbox: [x] </IMHO> Now, since the border-color defaults to the value of the color property, setting the color property to red would also set the border-color to red thus achieving the effect you asked for - a red radio button. >> Arguably, list bullets are text, and are generated content of the list >> element. Thus, a list with red bbullets and green list items can be >> made by setting color to red on the list container and green on the >> list items. >> > > Yes, I was mistaken about list bullets, they can be colored using the 'color' > property. > > <ul style="color: red" > > <li><span style="color: green" >hello</span></li> > </ul> Yes. Tantek
Received on Friday, 22 March 2002 17:15:03 UTC