Re: [css3-text-layout] New editor's draft - margin-before/after/start/end etc.

--------------------------------------------------
From: "HåkonWium Lie" <howcome@opera.com>
Sent: Saturday, May 29, 2010 1:52 AM
To: "Andrew Fedoniouk" <news@terrainformatica.com>
Cc: <www-style@w3.org>
Subject: Re: [css3-text-layout] New editor's draft - 
margin-before/after/start/end etc.

> Also sprach Andrew Fedoniouk:
>
> > I've proposed on the list once to introduce :ltr and :rtl 
> > pseudo-classes.
>
> Yes, this makes sense.
>
> > :rtl is true if element itself or its nearest parent have @dir defined
> > and value of that @dir is exactly "rtl"
>
> And, just to be clear, by @dir you mean HTML's 'dir' attribute. E.g.,
> as defined here:
>
> 
> http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#the-dir-attribute
>

Correct, "dir" is a DOM attribute here.

Precise algorithm of determination of :ltr,:rtl and :ttb values is this:
Start from the element itself and walk through child-parent chain
until you will find DOM element with defined "dir" attribute.
If value of the "dir" is "rtl" then set :rtl to true and reset all
other directionality pseudo-classes like :ltr and :ttb.

In fact all these :ltr, :rtl, etc. are not required if DOM would
implement @dir as such an inheritable attribute.
There is no such a concept as an inheritance in HTML so
I think we should do it on CSS level.

-- 
Andrew Fedoniouk

http://terrainformatica.com
 

Received on Saturday, 29 May 2010 17:42:23 UTC