Move-to in CSS3

One of my biggest beefs with working with HTML and CSS was that the separation of content and style had not gone far enough. One still had to consider the structure of the document in terms of element ordering. For instance, when writing a white-paper one would have to decide whether to place the table of contents before the summary within the HTML and not within the associated CSS. To change the ordering after the fact, one would have to change the content, not the associated style.

This styling issue is fixed somewhat with CSS3 and the introduction of the move-to property within the Generated and Replaced Content Module (via Sjoerd Visscher’s weblog). This is what I envisioned as a solution to the above problem except that one cannot move elements to anywhere in the document. One is instead restricted to moving elements to later within the document. I’d like to know why this restriction exists. I suppose the ability to move elements to anywhere within a document would degrade rendering performance, but surely that is an implementation detail. A browser could either choose to render the image and move elements on the fly or wait until all content is received before moving elements around. Still, it’s a step in the right direction towards the nirvana of complete separation of content and style.

  1. Meitar Moscovitz

    January 5, 2009 at 11:08 am

    I’m also curious why content can only be moved later in the document and not, say, earlier. I imagine you’re right in thinking that this has more to do with the way CSS is implemented, because CSS counters behave similarly in that you can only count things “in one direction.” Perhaps this is more a legacy implementation detail than anything elseā€¦?

Leave a Reply