Le 22 oct. 2012 à 15:50, Frank Taylor <pace...@madebypaceaux.com> a écrit :

> I'm working on an application where the client wants input[type="textbox"] to 
> look more like a sliding on/off switch than a typical checkbox. I was able to 
> produce the desired effect for -webkit browsers:  http://cssdesk.com/jJd87 
> 
> But, It would appear as though :after{content:"blah"} doesn't work on  in 
> non-webkit browsers. Opera seems to entertain the notion, but FireFox doesn't 
> try at all. I've experimented with input, select, and textarea in FireFox and 
> none seem to want to produce generated content. 
> 
> I've read through the specs and I don't see where it's written that :after or 
> ::after shouldn't produce generated content for form elements: 
> http://www.w3.org/TR/CSS2/generate.html#content. 
> 
> 1. Have I done something wrong in the CSS that causes 
> input[type="checkbox"]:checked:after to not work in FireFox/ Opera?
> 2. Have I missed something in the specs that makes this approach invalid?

Read the last paragraph (in green) in 
http://www.w3.org/TR/CSS2/generate.html#before-after-content.
Form controls are replaced elements.

Note that it is only Safari 6 and recent Chrome that support that generated 
content on form controls (and Mobile Safari on iOS 6).

Philippe
--
Philippe Wittenbergh
http://l-c-n.com




______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to