W3C home > Mailing lists > Public > www-style@w3.org > January 2012

RE: [css3-*] Review of functional syntax in CSS

From: Brian Manthos <brianman@microsoft.com>
Date: Fri, 20 Jan 2012 20:34:20 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>, Aryeh Gregor <ayg@aryeh.name>
CC: Henri Sivonen <hsivonen@iki.fi>, www-style list <www-style@w3.org>
Message-ID: <9710FCC2E88860489239BE0308AC5D170EB04F6A@TK5EX14MBXC266.redmond.corp.microsoft.com>
> You're pre-assuming a definition of "argument" that, I suspect, is
> actually inconsistent.

I would argue that that is the root issue.

Perhaps the solution is to add wrapping parens, or subfunction usage.....

Instead of
	Foo(1, 2, 3, 4, 5, 6)
	Foo(1 2 3 4 5 6)
	Foo(1 2, 3 4, 5 6)
Use
	Foo(bar(1 2) bar(3 4) bar(5 6))
	Foo(bar(1 2), bar(3 4), bar(5 6))
	Foo(bar(1, 2), bar(3, 4), bar(5, 6))

Notice that the commas become irrelevant and you can now also do
	Foo(bar(1) bar(3) bar(5))
and have it be treated the same as repeating
	Foo(bar(1 1) bar(3 3) bar(5 5))
Or as zeros
	Foo(bar(1 0) bar(3 0) bar(5 0))
Or whatever
	Foo(bar(1 1) bar(3 9) bar(5 25))

Example 1
	Radial-gradient(position(1px) size(3px) shape(5px), red, blue)
	Radial-gradient(position(1px center) size(3px 3px) shape(5px 5px), red, blue)

- Missing parameter in position are treated as they are for background-position.
- Missing parameter in size and shape are treated as symmetric.

Example 2
	Matrix(row(1) row(3))
	Matrix(row(1) row(3) row(0))
	Matrix(row(1 0) row(3 0) row(0 0))
	Matrix(row(1 0 0) row(3 0 0) row(0 0 0))
- Omitted values in rows are equivalent to specifying zero.
- Omitted rows are equivalent to a row of zeros.


Seems to solve the ambiguity and allow for commas or spaces as per author whim.
Received on Friday, 20 January 2012 20:35:00 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:48 GMT