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

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
}

opposite has no effect in cas of a parent with a text-align: center or
justify value.

jbcordina


2014-10-21 10:34 GMT+02:00 Jean-Baptiste Cordina <jbcordina@gmail.com>:

> Hi,
>
> I'm working on a website with multiples languages. And it's a huge thing
> to redefine text-alignments for some components. So I wonder if it is
> possible to add a new value to the text-align property.
>
> For example :
>
> text-align : opposite;
>
>
> my-component {
> text-align : left;
> }
>
> [dir=rtl] my-component {
> text-align: right;
> }
>
> my-component .read-more {
> text-align : opposite; // depends on the uppervalue, but I don't have to
> rewrite this rule.
> }
>
> Thx.
>
> Jean-Baptiste Cordina
>
>
>

Received on Thursday, 23 October 2014 20:50:06 UTC