[css3-regions] Separating regions markup

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 UTC