W3C home > Mailing lists > Public > www-style@w3.org > November 2012

[css3-regions] Separating regions markup

From: Alan Stearns <stearns@adobe.com>
Date: Fri, 16 Nov 2012 12:37:06 -0800
To: www-style <www-style@w3.org>
Message-ID: <CCCBE3F2.199DA%stearns@adobe.com>
Hey all,

Using HTML elements to produce the boxes for a region chain is a point of
contention. The point made against the current version of the spec is that
combining content and presentational code should be avoided when possible.
At TPAC 2012, Bert mentioned [1] that using an external file to define the
presentational boxes would be OK.

One way to use an external file for presentational purposes is being
defined by the Web Components [2] effort, so it may be a useful experiment
to see how we could define regions using custom elements and/or decorators
from Web Components. I know Bert would prefer generic XML to define a
template, but Web Components is re-using HTML to define the template
structure so I'm following their lead.

I've made a wiki page [3] that takes a very simple example of region
elements in the content markup, then moves the region elements out of the
content markup into a separate file using either custom elements or
decorators. With custom elements, defining a region chain becomes a matter
of adding a link to a file and one additional attribute on an element. No
other changes are needed in the content file. With decorators this is
reduced to a single CSS property.

Both of these approaches are not adding anything new - I'm just following
what's currently proposed for both CSS Regions and Web Components (though
custom elements are a bit further along than decorators). Given that there
is implementation work being done on both custom elements and regions, I
propose to edit CSS Regions Appendix A to use a custom element in the
example, to show how one should separate content from presentation.

Thanks,

Alan

[1] http://lists.w3.org/Archives/Public/www-style/2012Nov/0260.html

[2] http://dvcs.w3.org/hg/webcomponents/raw-file/tip/explainer/index.html
[3] http://wiki.csswg.org/spec/css3-regions/sequestering-regions
Received on Friday, 16 November 2012 20:37:33 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:02 GMT