W3C home > Mailing lists > Public > www-style@w3.org > April 2005

Re: Parent pseudo-containers - a method for seperation of content from design

From: Ben Curtis <bcurtis@bivia.com>
Date: Thu, 7 Apr 2005 16:33:16 -0700
Message-Id: <ee0a2e14492443aef54d1a92e20dd82d@bivia.com>
To: www-style@w3.org

On Apr 6, 2005, at 3:14 PM, Mark Moore wrote:

> I think Emrah's post speaks to a fundamental problem I'm beginning to 
> see.
> There are really three distinct concepts that need to be separated, 
> not two:
> Content, Layout, and Style.
> CSS crosses the boundary between Layout and Style and because it 
> doesn't
> directly address Layout it does a very mediocre job.

Kudos to Mark for striking this nail on the head.

As the lead developer and standards-monger (our own, as well as the 
W3C's) of a web development business, I used to encounter on a daily 
basis problems and bugs embedded in code due to layout and style 
declarations being intermingled. Often the code would mix its purposes 
simply because the purposes shared a selector -- the content goes here 
and the content looks like this. The way CSS works now encourages this; 
it's good for simplicity, but discourages complex growth.

This year, I began separating all stylesheets into styles and layout 
sheets, and it has made life much easier for my team and my clients. 
The team can more easily use the cascade and specificity rules to 
selectively declare and override rules without stepping on each other's 
toes (e.g., the designers stop using position:relative; when they 
really want to use margins). It encourages a development process where 
the client can approve a layout without needing to approve the color 
scheme and font.

However, I also create a stylesheet for "structures," which are 
reasonably self-contained and often intricate blocks of layout code 
that don't care where they are put (e.g., a nested ul menu). Because 
they are self-contained and we fill our reusable code library with 
these, they often contain styling info, but we separate that out with 
comments to change from site to site. Does this mean layout and style 
should merge? No. It just means that we haven't quite standardized a 
way to encapsulate multiple file types in a single file (MIME-like 
multi-part stylesheets would be a boon).

Without suggesting a solution, I want to heartily encourage more work 
in this direction. Perhaps pulling layout coding strictly into XSLT is 
good; perhaps pseudo-elements and moving is enough. I don't know. But 
if the code encourages the separation of these things, then I think 
we'll see more adoption and greater efficiency in authoring, especially 
by teams. I don't think that the current CSS layout techniques 
encourage this separation, and if a different language altogether were 
needed to separate these elements of design then it would be worth the 


	Ben Curtis : webwright
	bivia : a personal web studio
	v: (818) 507-6613
Received on Thursday, 7 April 2005 23:37:18 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:17 UTC