Closed Bug 950501 Opened 8 years ago Closed 7 years ago

CSS Variables fallback incorrectly implemented (secondary cycles)

Categories

(Core :: CSS Parsing and Computation, defect, P4)

29 Branch
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: fremycompany_pub, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0 (Beta/Release)
Build ID: 20131215030202

Steps to reproduce:

The following situation produces a result that does not match the spec:

	html { background-color: var(v1); }
	html { var-v1: var(v3,var(v2)); }
	html { var-v2: var(v1); }
	html { var-v3: red; }




Actual results:

background-color: transparent;


Expected results:

background-color: red;

// this is because the cycle in the fallback value is not an issue here, because it never gets evaluated. indeed, according to the spec, property references in the fallback argument are only resolved in they are used.
Flags: needinfo?(cam)
Blocks: 773296
That isn't how I read the spec, but looking at it again I think it is not clear.  The relevant sentence is:

  This can create cyclic dependencies where two or more custom properties each attempt
  to use the variable that the other defines; doing so makes all the custom properties
  involved in the cycle compute to their initial value (which is a guaranteed-invalid
  value).

What "attempt to use" actually means isn't defined.
Flags: needinfo?(cam)
OS: Windows 8.1 → All
Hardware: x86_64 → All
Priority: -- → P4
Blocks: 957833
I don't know if it resulted in a spec change yet, but Tab came to the conclusion that our current behaviour is what we want.

http://lists.w3.org/Archives/Public/www-style/2013Dec/0357.html
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.