Re: [css3-text-layout] New editor's draft - margin-before/after/start/end etc.

On 6/3/10 4:33 PM, Håkon Wium Lie wrote:
> You should be able to forget about it when the value of 'writing-mode'
> is known for all elements, I believe.

There is no such point if scripting is allowed in a document, since 
script can add new elements, right?

>   >  Maybe the issue is that there are more sets of values than we've really
>   >  been talking about.  The complete list, as I see it, is:
>   >
>   >  1)  Specified values (tied to style rules).
>   >  2)  Cascaded values (tied to elements).
>   >  3)  Computed values (tied to elements).
>   >  4)  Used values (tied to elements).
>
> That's not the terminology used in the specs. In the specs, the
> "specified value" is not tied to style rules. Rather, for every
> property/element combination there is a specified value.
>
>    http://dev.w3.org/csswg/css3-cascade/
>    http://www.w3.org/TR/CSS2/cascade.html#specified-value

OK, fair.  The spec doesn't seem to have a good way to talk about the 
actual values in declarations....

> And for the properties in question ('direction' and 'block-flow',
> which 'writing-mode' is a shorthand for) the specified value is the
> same as the computed value.
>
>    http://dev.w3.org/csswg/css3-text-layout/#direction
>    http://dev.w3.org/csswg/css3-text-layout/#block-flow

Right, and by this definition of "specified value" the value depends on 
the rules applied to the element and the parent of the element, right 
(think "writing-mode:inherit").

> I think one should convert DDAs before they turn into specfied values.
> That is, DDAs should not have specified values -- only properties that
> also have computed/used/actual values should have specified values.

OK.  Given the definition of "specified value" in CSS2.1, that seems 
reasonable.

Note that currently there is no DOM API for accessing specified values 
in that sense.  There's an API for accessing declarations, and an API 
for accessing computed/used (sort of a mix) values, right?

> Something like: "if a property has an alias, resolve it and let it
> fight its way through cascading...". Hmm.

You can't resolve before cascading, can you?  Or rather, you can't 
resolve before you have cascaded and maybe-inherited writing-mode.

> Ok. But you remember the declarations, it seems. Consider this example:
>
>    http://people.opera.com/howcome/2010/tests/log.html

Yep.  Declarations are remembered, indeed.

> Ideally, I would have liked to resolve the aliases once and for all.

You can't do that in dynamic environments in which elements can be added 
(or writing-mode changed, as in your testcase).

-Boris

Received on Friday, 4 June 2010 00:16:09 UTC