[css3-layout] Template Layout Module and text selection.

Template Layout Module allows to put multiple non-consecutive (in the 
DOM) elements into so called slots.
As far as I understand each such slot is a pseudo block container that 
establishes block formating context (is this correct?).
Visually such a slot presented to the user as a solid block.
I am not sure how in principle text selection will work inside such blocks.

Consider following [pseudo] markup:

<p destination-slot="b">One</p>
<p destination-slot="a">Two</p>
<p destination-slot="b">Three</p>

And the template:
   "a"
   "b"

This setup will presented to the user as a column:

Two
One
Three

Now consider following cases of selection ('<' marks selection start and 
'>' is an end of the selection):

Two
O<ne
Thre>e

T<wo
O>ne
Three

Question: what is supposed to be selected in these cases?

---
In general: layout managers in CSS when applied to HTML should be 
designed in the way that
keeps next/previous visual order elements with their DOM positions. 
Otherwise we will need to change
principles of how text selection is handled. Absolute positioning and 
floats used for layout purposes are
already examples making text selection not quite useful for the humans. 
Defining layout manager that is
capable to break next/previous relationship in even static flow will 
make situation even worse.

Related to this: artificial block containers generation shall be avoided 
as much as possible.
Need of using explicit block containers is in principle less harmful 
than bunch of problems related
to such zombie elements (need of very artificial slot() constructions in 
CSS, etc.)

--
Andrew Fedoniouk.

http://terrainformatica.com

Received on Wednesday, 29 April 2009 19:01:22 UTC