« Attending UIE's Web App Summit this week | Main | Evolving Cozi's calendar UI controls »

November 09, 2009


Richard Birkby

The primary way to encapsulate a control is using a new block formatting context. But you don't seem to do that. So how do you localize any floats to within the control?

Jan Miksovsky

Richard: QuickUI controls ultimately manifest themselves as divs that can be styled however you want. The section on "More on styling" in the tutorial (http://quickui.org/tutorial/section11/default.html) shows how to style the top level control element, i.e., the control's topmost div. So you can apply your clear, float, overflow, position, etc., there, and be able to achieve any result you're looking for.

I hadn't considered trying to set something like display: block on all controls. I've tried to make the smallest number of assumptions to start, and only add things that seem really necessary and near-universal. (I've occasionally had controls whose topmost div has, for example, display: table or inline). If you wanted to really isolate controls through some universal styling, you could define a rule on the .Control class (which is applied to all QuickUI controls). If people generally found that helpful, that behavior could get folded into QuickUI. Please let me know what you think.

The comments to this entry are closed.