W3C home > Mailing lists > Public > www-style@w3.org > December 2008

Re: background-position and bidi in CSS 2.1

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Sun, 14 Dec 2008 11:24:08 -0800
Message-ID: <49455D58.9000206@terrainformatica.com>
To: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
CC: "www-style@w3.org" <www-style@w3.org>

Daniel Glazman wrote:
> Andrew Fedoniouk wrote:
>> I've tried. That created significantly more problems than solutions.
>> Anyway in most cases you even cannot reuse the same image for rtl
>> case - it needs to be changed.
>> In my opinion for RTL support in CSS significantly more valuable
>> would be an introduction of :rtl pseudo-class. It is "on" when
>> nearest container of the element with dir attribute has value of the
>> dir attribute equal to "rtl".
> Yes but it does not solve the problem I detailed. Background
> positioning in currently significantly weaker in rtl.

The solution is to introduce the way to define background-position
origins using right and bottom sides.

This makes sense not only for RTL but is very useful in general.
Take a look here:
Note the menu item with arrow that is defined in
markup as:
<menu>... <li>Third item ....</li></menu>
That arrow image has to be positioned with 4px shift from
the *right* side in *LTR* environment and with 4px shift
from the *left* side in RTL. Image by itself has to be
changed too.

Thus having background-position-right/bottom *and* the :rtl

1) will allow you to support RTL in background images;
2) will allow to define background image positions better
    for all other cases;
3) will eliminate need of introduction of bunch of
    margin-start/end, etc. attributes.

start/end values for image positions you propose fix particular
problem but not the case I've described above.

Andrew Fedoniouk.

Received on Sunday, 14 December 2008 19:24:48 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:42 UTC