- From: Andrew Fedoniouk <news@terrainformatica.com>
- Date: Fri, 28 May 2010 21:13:27 -0700
- To: HåkonWium Lie <howcome@opera.com>, "Alan Gresley" <alan@css-class.com>
- Cc: <www-style@w3.org>
--------------------------------------------------
From: "HåkonWium Lie" <howcome@opera.com>
Sent: Friday, May 28, 2010 11:26 AM
To: "Alan Gresley" <alan@css-class.com>
Cc: <www-style@w3.org>
Subject: Re: [css3-text-layout] New editor's draft -
margin-before/after/start/end etc.
> .start:lang(he), .start:lang(ara) {
> .start li { margin-right: 100px; padding-right: 100px }
> .end li { margin-left :100px; padding-left: 100px;}
> }
>
> Now, there's a bunch of Arabic and Persian language codes, so you would
> have to extend the selector to get complete coverage.
>
> Using language codes as hooks would be an incentive for people to use
> language codes.
>
I've proposed on the list once to introduce :ltr and :rtl pseudo-classes.
:rtl is true if element itself or its nearest parent have @dir defined
and value of that @dir is exactly "rtl"
In the same way :ltr is defined. And :ttb.
Having them all these controversial margin-before/after/start/end are not
needed as anyone can explicitly define
.start
{
.start li { margin-right: 50px; padding-right: 50px }
.end li { margin-left :100px; padding-left: 100px;}
}
.start:rtl
{
direction: rtl;
.start li { margin-right: 100px; padding-right: 100px }
.end li { margin-left :50px; padding-left: 50px;}
}
So the @dir is a sole source that defines all aspects
of directionality. Having one CSS property to be dependable
on another is IMO path nowhere.
Anyway your list ( :lang(he), :lang(ara) ) is not full.
And yet even on, say, Arabic pages it could be
"LTR islands" that are marked by dir="ltr".
And think about pages like gmail. You could have
the page itself using :lang(en) but email message will
be :lang(ara) or so. I think it is obvious what may happen
with your selectors in this case.
My two cents.
--
Andrew Fedoniouk
http://terrainformatica.com
Received on Saturday, 29 May 2010 04:13:59 UTC