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

On Mon, Nov 3, 2014 at 10:46 AM, Aharon (Vladimir) Lanin
<aharon@google.com> wrote:
> 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.

To be more specific, just rewrite the original example:

>> > 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
>> > }

into:

my-component {
  text-align: start;
}

my-component .read-more {
  text-align: end;
}

~TJ

Received on Monday, 3 November 2014 19:00:52 UTC