Re: [css3-text-layout] margin-before/after/start/end etc. and :ttb pseudo-classes

On 06/04/2010 09:24 AM, Brad Kemper wrote:
>
> On Jun 4, 2010, at 6:18 AM, MURATA Makoto (FAMILY Given) wrote:
>
>> Second, I think :rtl and :ttb are just too different.  The former is
>> based on the @dir attribute, while the latter is not.   They should
>> be separated.
>
> Ever since you pointed out (to me) that basing things on just the 'dir'
> attribute would not be enough, because @dir does not include 'ttb', I
> believe the conversation of pseduo-selectors has been based on either:
>
> 1. @dir would be changed to include 'ttb', or...
>
> 2. :rtl and :ttb (or ::rtl and ::ttb) would be based on anything that
> changed writing mode, including unicode characters&  equivalent HTML
> entities, computed value of 'writing-mode' property, etc.
>
> I think #2 is the best choice. #1 has the problems you pointed out
> (style vs. structure), plus there is the fact that HTML is not the
> only markup language that CSS is supposed to work with. I prefer
> these as pseudo-classes (not pseudo-elements), that would be applied
> to any element that had a primary writing mode, however that mode
> was achieved (unmarked ranges of text do not typically need padding,
> margin, etc.). The UA knows what direction it is drawing it's text
> (how could it not), so this should not be a problem. You would just
> need to outlaw (or otherwise deal with) this sort of thing:
>
> :ttb { block-flow:tb; }
> :rl { direction:ltr; }

With regards to pseudo-selectors,

   1. At no point in time has the Working Group seriously considered
      a selector that keys off the value of another CSS property. *All*
      such proposals have been rejected outright because of the kind of
      problems Brad points out here.

      Selector matching is currently an process that is completely
      independent of the cascading, inheritance, and computing stages
      of CSS, and it is my strong opinion that it should remain that way.

   2. The proposed :rtl and :ltr selectors key off the effective
      directionality of an element *as declared in the document*. In
      HTML, this is the value of the [dir] attribute on the element or
      on its closest ancestor with a [dir] attribute. The value of the
      CSS 'direction' property has no effect on whether :rtl and :ltr
      match. This definition preserves the separation between selector
      matching and CSS property cascading/inheritance/computation.

   3. The [dir] attribute gives the base directionality of a text. This
      is not a layout-based or stylistic property, but an inherent
      characteristic of the text--specifically, it is an inherent
      characteristic of the primary writing system used in the text.
      The author is required to declare it in HTML because heuristics
      for determining which script used in the document is the primary
      script of a document are unreliable.

      There are in fact writing systems whose primary directionality is
      ttb; but the :ttb selector discussed here seems to have nothing
      to do with handling those.

~fantasai

Received on Friday, 4 June 2010 18:08:02 UTC