W3C home > Mailing lists > Public > www-style@w3.org > November 2014

Re: Proposal : Adding an "opposite" value to "text-align" property

From: Aharon (Vladimir) Lanin <aharon@google.com>
Date: Mon, 3 Nov 2014 13:46:59 -0500
Message-ID: <CA+FsOYbLc+fpW+yN2sTde-T=67GP92rqBFDv5ROz2AGuamc_uw@mail.gmail.com>
To: "L. David Baron" <dbaron@dbaron.org>
Cc: Jean-Baptiste Cordina <jbcordina@gmail.com>, W3C style mailing list <www-style@w3.org>
The use case for text-align: opposite seems to be dealing with RTL
languages. Given the availability of text-align: start and text-align: end,
I don't understand the need for opposite.

On Thu, Oct 23, 2014 at 5:10 PM, L. David Baron <dbaron@dbaron.org> wrote:

> On Tuesday 2014-10-21 17:39 +0200, Jean-Baptiste Cordina wrote:
> > Just added some details because I think i forget to define the way it has
> > to work.
> >
> >
> > my-component {
> > text-align : left;
> > }
> >
> > [dir=rtl] my-component {
> > text-align: right;
> > }
> >
> > my-component .read-more {
> > text-align : opposite; // if parent has text-align: left then opposite =
> > right else if parent has text-align: right the opposite = left
> > }
>
> Except for this statement:
>
> > opposite has no effect in cas of a parent with a text-align: center or
> > justify value.
>
> what you want could be done using
> http://dev.w3.org/csswg/css-values/#toggle-notation (although that's
> not implemented yet, I don't think).
>
> The question is if it's an important enough use case to deserve a
> separate value.
>
> -David
>
> --
> 𝄞   L. David Baron                         http://dbaron.org/   𝄂
> 𝄢   Mozilla                          https://www.mozilla.org/   𝄂
>              Before I built a wall I'd ask to know
>              What I was walling in or walling out,
>              And to whom I was like to give offense.
>                - Robert Frost, Mending Wall (1914)
>
Received on Monday, 3 November 2014 18:47:46 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:26 UTC