- From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
- Date: Wed, 06 Apr 2005 00:52:59 +1000
- To: Matthew Raymond <mattraymond@earthlink.net>
- CC: W3C CSS <www-style@w3.org>
Matthew Raymond wrote: > Lachlan Hunt wrote: >> ...there is no way to select an element based on the way the user >> agent processes it, only based on its markup. Oops, my mistake. I should have said something more like "...only based on the DOM, which is created from the markup." > That has been my observation. Things are styled on the markup version > of the attributes (at best) rather than the associated DOM property. No, they are styled based on the DOM. >> No, it won't work, because UAs are still going to have type="datetime" >> within the DOM, even though they are treating it as type="text". > > I think you mean that the DOM property would be "text" while the > markup would have "date"... No, I meant what I said. Check Mozilla's DOM inspector to confirm that the attribute value in the DOM will match the value written in the markup. >> As a work around, you could possibly make use of a selector that is >> commonly supported by Web Forms 2 UAs, but not by non-Web Forms 2 UAs. >> Basically, you'll have to make use of a CSS filter of some kind. > > Something like this?: > > | input { /* Default styling. */ } > | input:dom(type, "date") { /* Date styling. */ } That won't work because, as I stated previously, the DOM will contain the same value as that written in the markup. However, as Anne mentioned in his reply, I meant that you could use a CSS hack (though I called it a CSS filter instead), not make up a new selector. -- Lachlan Hunt http://lachy.id.au/ http://GetFirefox.com/ Rediscover the Web http://GetThunderbird.com/ Reclaim your Inbox
Received on Tuesday, 5 April 2005 14:53:06 UTC