Re: [css3-regions] Separating regions markup

Bert Bos wrote, on 29 Nov 2012:

 > > As I mentioned last week, I've edited the sample code in Appendix A
 > > [1] in CSS Regions to move the regions elements to a separate file
 > > using custom elements from Web Components [2].
 > > 
 > > Bert, Håkon - does this approach satisfy your requirement for
 > > separating content markup from layout?
 > 
 > I think it can work.

Certainly, it's much better than having empty elements in HTML files. 

I would probably still prefer to find a CSS-based syntax because:

  - having to fetch yet another resource in yet another format is more
    work

  - the structure represented in your example (and, most likely, in
    the common use cases) does not need deep nesting; regions are
    (mostly) chained, not nested

  - a new format creates a need for a new mime-type etc; the new
    format should not be served as HTML

  - having selectors apply to the exteral resouce seems troublesome;
    what do you do if #region1 matches both an elemen in the local
    file and in the external resource? (Do we need name spaces here?
    Ouch, my head start hurting)

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome

Received on Wednesday, 30 January 2013 22:56:29 UTC