- From: Orion Adrian <orion.adrian@gmail.com>
- Date: Wed, 29 Jun 2005 08:56:57 -0400
- To: www-style@w3.org
On 6/29/05, Paul Duncan <paul.duncan@marketpipe.com> wrote: > > > -----Original Message----- > From: Ian Hickson [mailto:ian@hixie.ch] > > >The problem is that 'color' is an inherited property. > >Inheritance is done before layout > >it has to be, since the layout depends on inheritance). > > I cannot see how the 'color' of an element can in anyway affect the layout. > > >You don't know what is a column until you've done the layout. To make > >'color''s inheritance depend on the layout thus doesn't fit CSS's model. > > > But nobody has yet given a solution that is easily implementable in the > > > CSS model. > > Here's a simple solution?!? > > First pass all CSS aspects relating to layout are applied. > Then the layout is rendered > Then a second pass renders aspects relating to color and other non-layout > styles. > > Do I get a prize? I'll give you one, though there seems to be a lot of resistance to the idea of a two pass system, so I doubt it will be done. Perhaps they feel the system will have to redownload the files or something. Though I think they need to rethink CSS layout anyway. I personally find using floats to create columns as a unnecessary evil. I'd like to see the display, float and clear properties taken out. Create a simple language that uses simple selectors that's designed specifiically around the layout problem. The layout of a document is then written not as parts of CSS, but rather as containers that specify their content using CSS selectors. <layout> <vblock> <item src="body div.header" /> <hblock> <item src="body div.navigation" width="30%" /> <item src="body div.content" width="40%" valign="top" halign="left" /> <item src="body div.sidebar" width="30%" /> </hblock> <item src="body div.footer" /> </layout> More complex layouts could be accomplished fairly simply and new layout models (say table) could be done. vblock creates a vertical block of elements, hblock creates a horizontal block of elements and item specifies space and layout properties. Some benefits of separating layout from other properties including margin, border and padding. 1) No interaction prevents rounding errors from forcing blocks off the screen. 2) Layouts can be see together as a unit instead of split up accross more or one rules. Increased reability. 3) Increased readability promotes increased writability. 4) Layout documents will be much smaller than the content documents they describe allowing the entire layout to be known before having to render any of it. It allows simpler, faster rendering engines to be built. 5) This language is not built around html and css selectors. Any selector could be used for any language (tree-based or not). 6) Content can be presented in a different order than it is in source. 7) Text could be laid out using the benefits of table-style rendering without all those semantic headaches. 8) No need for calc since margin, padding, border and layout don't mix. And some others, but that should be enough. But like every idea I put before the group, it will be ignored as it's better to sit with what we have then try to rethink the current solution. Oh well. Orion Adrian
Received on Wednesday, 29 June 2005 12:57:01 UTC