Re: Columns and other layouts

I think that the ability to specify conditionals would be a great boon 
and might go a long way to solving lots of problems of the type that 
Coises has suggested, if not those actual ones, and many others. The 
W3C seems intent on making HTML+CSS a solution for every user, every 
media and every platform, but how can this be achieved effectively 
without either conditionals or reducing the document to the lowest 
common denominator (some ASCII)? @media addresses this problem to an 
extent, but it ignores the fact that there are many different types of 
screen media, for example.

Authors know a lot more about their layouts than they can currently 
specify. Example, if I have three columns, I would want them left to 
right in a wide enough browser, but I might want columns 1 and 3 to be 
collapsed into one column on a narrow browser.

The constraints specification hints at conditions, providing the 
@precondition directive for this purpose and, although the syntax is 
inconsistent, I think this is good idea. The properties that would be 
available to condition authors is already known because of DOM efforts.

The tricky bit is limiting reflows. I think @post-cascade is wrong, 
because all conditions should be post-cascade, how else could they 
work? Otherwise, what system could be employed to resolve the following 
quickly and easily and what outcome would it select?

@if (#a[width] > #b[width]) {
	#a { width:100px; }
	#b { width:200px; }
}

@if (#a[width] < #b[width]) {
	#a { width:200px; }
	#b { width:100px; }
}

I guess the obvious solution would be to select rule 2, but is there a 
robust way to detect that the two rules will conflict and that the 
first should be ignored?

Media queries provide some conditional capabilities, but these do not 
expose enough properties to the conditions, allow the author to only 
assess the output device properties, and not the environment of other 
elements in the document.

Ben


(q)	Ben Godfrey?
(a)	Web Developer and Designer
	See http://aftnn.org/ for details

Received on Monday, 28 April 2003 14:31:01 UTC