Re: directional images

On Thu, Feb 24, 2011 at 7:58 AM, Brad Kemper <brad.kemper@gmail.com> wrote:
> On Feb 23, 2011, at 1:00 PM, Tab Atkins Jr. wrote:
>> <ul dir=rtl>
>>  <li>ONE</li>
>> </ul>
>> <style>
>> ul {
>>  list-style-image: image( url("right-facing-arrow.jpg"), ltr );
>>  transition: list-style-image .2s;
>> }
>> ul:hover {
>>  list-style-image: image( url("highlight-right-arrow.jpg"), ltr );
>> }
>> </style>
>
> The parentheses embedded in parentheses are kind of hard to read. This seems like a place where we should have a direction pseudo-class, and then just use a different image (or have  image transformation properties for list-style-images, border-images, etc.).
>
[snip]
> ul:rtl {
>  list-style-image-transform: reflect(0deg);
> }  /* or, transformation is automatic for directions not specified by author */

This last one works for me too.  There are only four image properties
in CSS, so having a separate transform property for them wouldn't be
onerous, I would think.  We've talked about the usefulness of
transforming images before, too (rotation/scaling/skewing of
background images, particularly tiled ones, for example).

(While I'm usually in favor of image manipulation happening at the
<image> level rather than the property level, in this case it would
require repeating an image, which is fragile.  Better for the author
to have transforms directly.)

~TJ

Received on Thursday, 24 February 2011 17:24:16 UTC