- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Wed, 01 Feb 2012 16:20:38 -0500
- To: Brian Manthos <brianman@microsoft.com>
- CC: Glenn Adams <glenn@skynav.com>, "www-style@w3.org" <www-style@w3.org>
On 2/1/12 4:04 PM, Brian Manthos wrote: > Example A > > <div style=”border: red dashed 1px;”> > > Example B > > <div style=”border-color: red; border-style: solid; border-width: 2px;”> > > JavaScript then queries… > > 1.document.getElementsByTagName(‘div’)[0].style.border > > 2.document.getElementsByTagName(‘div’)[0].style.border-color > > I would argue that the answers should be… > > A1 “red dashed 1px” > > A2 “red” > > B1 “red dashed 1px” > > B2 “red” Yes (modulo 1px vs 2px and solid vs dashed and borderColor vs border-color). > My impression is that some would argue the answers should be… > > A1 “red dashed 1px” > > A2 “” > > B1 “” > > B2 “red” A2="" is not web-compatible, I'm fairly certain. B1="" may be web-compatible maybe, but I somewhat doubt it. Do any UAs have the B1="" behavior? In any case, it seems undesirable. But that has nothing to do with length and item() behavior, a priori. There are plenty of other cases where a property exists but is not reflected in length/item (e.g all nodelists have such properties, JS arrays have properties not reflected in the length, etc). > As I mentioned previously, for cssText I understood the goal to be more > minimalistic/concise and thus the coalescing makes sense. Yes. -Boris
Received on Wednesday, 1 February 2012 21:21:28 UTC