[css3-images] cycle detection and element() from L. David Baron on 2012-02-05 (www-style@w3.org from February 2012) (original) (raw)
http://dev.w3.org/csswg/css3-images/#element-cycles (Overview.html revision 1.269) says the following:
Populate the dependency graph initially by having every element
depend on each of its children. Then, whenever a property on an
element A uses the ‘element()’ function to refer to an element
B, add an edge to the graph by having A depend on B. If a
dependency cycle is detected, any ‘element()’ functions that
produced a dependency in the cycle must represent a fully
transparent image with no intrinsic dimensions.
It's not entirely clear, but this sounds to me like it's defining an algorithm that happens in a certain order (given its use of words like "whenever ... add"). In other words, it sounds like this algorithm might be suggesting that with this markup:
There's no reason for this algorithm to depend on the order of CSS style computation. That's a dependency that could be very confusing for authors even if that order were defined, which it's not (and shouldn't be).
Additionally, the "add" wording is confusing because when the computed value of the property no longer contains the element() function, the edge should definitely be removed from the graph, which might cause a previously-eliminated background to render. Doing otherwise would violate the principle that the sequence of dynamic changes that led to the current state shouldn't affect how that state is rendered.
I believe this section needs to be rewritten to describe the state of the graph in terms of the present state of dependencies rather than describing it in terms of addition operations that happen at certain times.
-David
-- 𝄞 L. David Baron http://dbaron.org/ 𝄂 𝄢 Mozilla http://www.mozilla.org/ 𝄂
Received on Sunday, 5 February 2012 20:59:30 UTC