- From: Alexis Menard <alexis.menard@openbossa.org>
- Date: Tue, 31 Jan 2012 16:21:29 -0300
- To: Brian Manthos <brianman@microsoft.com>
- Cc: "www-style@w3.org" <www-style@w3.org>
On Tue, Jan 31, 2012 at 4:07 PM, Brian Manthos <brianman@microsoft.com> wrote: > http://www.w3.org/TR/css3-values/#common-keywords > W3C Working Draft > http://dev.w3.org/csswg/css3-values/#common-keywords > Editor's Draft > > A lot is unclear regardless of which draft is referred to. > > For example: > 1. Should "inherit" ever be returned as all or part of the output from an OM query? Or, instead, is in an input-only thing? > 2. Should the internal state after inherit be like the unset state or different? More specifically, should the OM state of stylesheets .A and .B be the same? I suspect the answer is no so that if you apply rule .B after another rule, it should have an impact whereas .A would not. > > .A { } .B { box-shadow: 1px 1px red; box-shadow: -prefix-inherit; } > > > Having made it clear that the expected behavior is very underspecified, I'll try to help nonetheless. > > > Alexis Menard: >> Should we expand the longhands when initial or inherit is set on a shorthand? > I'm not sure what you mean here, but I'll try to guess. I meant should I explicitly set the initial or inherit on the longhands therefore add them to the list of declarations of the style? > > Example C: > <span style="border: 7px dashed red;">s<div style="border: inherit;">D</div>s</span> > > Example D: > <span style="border: 7px dashed red;">s<div style="border: -prefix-initial;">D</div>s</span> > > In example C, I would expect OM queries for style on the DIV to report "border: inherit". Which WebKit does today for example. But on example C do you expect to have DIV.style.length to report 1 or the same length as the SPAN. > In example D, I would expect OM queries for style on the DIV to report one of the following depending upon which "less than CR" specs you want to incorporate: > a. "" > b. "border: -prefix-initial" > c. "border: medium none currentColor" > d. "border: medium" > > a: most compatible with 2.1 > b: one interpretation of Values > c: another interpretation of Values, ignoring OM > d: same as c, but respecting minimization rules of OM Right now I'm unfamiliar with -prefix-initial so I will read about it. > > Alexis Menard: >> Should the shorthands be part of the list of properties of the style, >> so part of the count/length? > > In the examples above, I would expect only the shorthand to be including in the style response as shown above. If "border-width: 1px 2px 3px 4px;" was added to the specified inline style, then the shorthand becomes can no longer be constructed and thus longhand values would be included in the style output instead. Given this example : <div style="border-width: 1px 2px 3px 4px;"></div>. What would be the length of the style for the div? - 4 ? (border-top-width, border-right-width, border-bottom-width, border-left-width) - 5 ? (border-top-width, border-right-width, border-bottom-width, border-left-width, border-width) > > Alexis Menard: >> When I set initial to a shorthand will it mean that the longhands will >> have initial implicitly set or would it be explicitly? > > Using examples C & D again above, these are all explicitly setting all of the (sub-)properties (border-width, border-style, and border-color). When I originally wrote the email I thought that explicit would be sensible. > > > Hopefully useful and correct guidance. If failing either, I'm confident Elika and Tab will jump in swiftly to bring justice. > > Cheers, > - Brian > -- Alexis Menard (darktears) Software Engineer INdT Recife Brazil
Received on Tuesday, 31 January 2012 19:21:57 UTC