Re: background-transform (Was: Re: [css3-images] Repeating oblique gradients)

On Mon, Dec 6, 2010 at 5:51 PM, Sylvain Galineau <sylvaing@microsoft.com> wrote:
> From: Tab Atkins Jr. [mailto:jackalmage@gmail.com]
>> On Mon, Dec 6, 2010 at 1:06 PM, Sylvain Galineau <sylvaing@microsoft.com>
>> wrote:
>> I was just saying that, so far, I haven't seen any particular use-cases
>> for such a thing.  I don't doubt that they exist, but I'd rather not add
>> anything to a spec that hasn't either convinced me of its usefulness or
>> been pushed by browser vendors.
>
> Well, we're a browser vendor :) It seems unlikely the WG will figure out
> whether it's useful and doable without talking about it.

Oh, of course.  Do you think it's useful?  If so, would you mind
dredging up some use-cases for transforming images in-place?


>> > I was actually thinking of an at-rule which maps a name/ident to an
>> image URL and properties that should be applied to this image when the
>> name is referenced e.g. transforms, opacity, width/height...Then
>> background-image, border-image, cursor-image et al. could just use
>> image(<ident>).
>>
>> This seems like a straightforward application of CSS variables.  We're
>> trying out a new experimental implementation of them now in Webkit.  I
>> agree that, since we seem to be forming a functional language for image
>> construction, we need some short way to refer to an image, so authors
>> don't have to duplicate long functional expressions.
>
> The analogy I had in mind was actually @font-face: bind a name to a resource
> and a set of relevant properties. Then use the name wherever a value of this
> type is accepted.
>
> Being able to use CSS properties - as opposed to a list of function
> arguments - sounds more expressive and readable.

Oh, hm, that does sound potentially useful.  Conceptually, we can
pretend that we're setting properties on an <img> element or
something, and then extracting the image back out to use elsewhere.
That's a good argument for a specialized @rule.

While I don't think that *right now* there's sufficient use to define
such a thing, if we decide that transforming images is useful, that
would be enough for me to support defining this.


> It might also fit with other
> scenarios you've brought up e.g. interopolating/transitioning between two images
> could be more natural for authors when they can specify the widths, heights and
> other properties they need on the start and end image and then just transition from
> one to the other.

Sure, that sounds plausible.

~TJ

Received on Tuesday, 7 December 2010 02:59:40 UTC