Re: [css3-regions] Separating regions markup

On 3/12/13 4:53 PM, "Håkon Wium Lie" <howcome@opera.com> wrote:

>Alan Stearns wrote:
>
> http://dev.w3.org/csswg/css3-regions/
>
> > Please take a look at the changes. I believe this satisfies the
>concerns
> > behind issue 16858 [2] about (a) keeping content separate from layout
>and
> > (b) using good practices in spec examples.
>
>It seems that the draft still allows elements in the document to turn
>into regions? If so, it doesn't address the concerns I have expressed.

While I have not banned elements from becoming regions, I do believe the
change makes progress towards addressing the underlying concerns I listed.
I am making accommodations for your position, and in doing so I think I
have strengthened the proposal. I think accommodations on your side might
also prove worthwhile.
  
>
>While placing the elements outside of the document itself is an
>improvement, it still seems like tag abuse to turn semantic elements
>into presentational boxes. HTML templates allows for document
>fragments to be moved somewhere else, but they are still HTML
>elements.

Just like CSS Regions, HTML Templates are using elements to define
presentational boxes. Whether its tag abuse or not, this appears to be
part of the future of the web platform. I am encouraged that the current
CSS Regions draft examples translate so well to using HTML Templates. It
indicates to me that the design of CSS Regions is operating at the correct
level for integrating into future work.

>
>One of the fundamemtal motivations behind CSS was to stop tag abuse in
>HTML. The regions spec, as currently written, seems to encourage it.
>
>However, the draft also mentions a better solution: using @slot (or
>something) to define reqions. The only argument against this solution
>is that no DOM exists for regions defined this way. I suggest we
>define that DOM rather than encourage the use of HTML elements to
>represent regions.

I support defining more ways to create boxes in CSS, and promoting
pseudo-elements to full OM citizens. I have produced two editor's drafts
on these topics, but neither has become a work item for the group yet. The
@slot or ::slot pseudo-element hasn't made it into the grid layout
specification either. Given this, I think it's clear that the working
group is more engaged with CSS Regions than these pseudo-element
extensions. We have worked hard to ensure that CSS Regions will be
compatible with these extensions, but without *requiring* that region
boxes come from CSS syntax only.

The community also appears to be very engaged with Shadow DOM (including
HTML Templates), which covers quite a bit of the same terrain as extending
pseudo-elements. It seems like a ::before pseudo-element could be
implemented as a simple custom element, which would have well-defined OM
characteristics. Adapting Shadow DOM to the use cases for generating
presentational boxes may be a better strategy than re-inventing markup
structure in CSS.

>
>As for examples, I belive all specs should have a simple motivational
>example with all code needed at the beginning of the spec. The sample
>code should not be stowed away in an appendix.

The motivation for CSS Regions is complex layout, so a simple example
doesn't quite fit. Section 1.1 already has a very simple code block that
demonstrates use of flow-into and flow-from, which I think is appropriate
for that section. The rest of the code in the appendix is just one example
of how you might position regions. Since there are plenty of other ways to
create that particular layout using regions, I think the appendix code
would be a distraction from the main point of Section 1.1.

> 
>
>The first example in the regions spec has become more complex. To me,
>the layout it suggests isn't typical or compelling; my eyes move
>naturally from 2 to 4, and not from 3 to 4.

That's not the case for me. But to address this concern I've changed the
grid height to 110vh. Now you do not even see region 4 until you have
scrolled to read through region 3.

Thanks,

Alan

Received on Wednesday, 13 March 2013 20:17:08 UTC