W3C home > Mailing lists > Public > www-style@w3.org > May 2012

Re: [css4-images] @image rule

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 4 May 2012 23:25:44 -0700
Message-ID: <CAAWBYDB55mm35U-rxYbxkksJg_XfzJT1GQeZOv98HhMYCfmCvQ@mail.gmail.com>
To: Lea Verou <leaverou@gmail.com>
Cc: www-style list <www-style@w3.org>
On Thu, May 3, 2012 at 4:36 PM, Lea Verou <leaverou@gmail.com> wrote:
> I'm not very sure that this proposal is a good idea, but I wanted to discuss it with the list, in case someone comes up with something better.
>
> The problem: Many people want to add additional properties to CSS, in order to be able to manipulate (mostly) background images. For example, to apply opacity, transforms, blending modes to them. This need is even evident in the Blending Modes draft, which introduces background-blend-mode properties [1]. Others, (ab)use pseudoelements to achieve effects like transforms and opacity for background images [2]. As more properties are introduced in CSS, the need to apply them to specific images separately becomes even stronger.
>
> Adding new properties for all these effects introduces clutter in the language and is not elegant. I propose a new @-rule that defines an image and manipulates it through a series of descriptors that correspond to a subset of CSS properties.

I agree with this reasoning.  I believe David Baron suggested
something similar several years ago, as an alternative to multiple
background layers.  I'd like to introduce something like this.

Your suggestion to use image() to refer to it is pretty clever; I
don't see any immediate problem with it if we make sure to enforce
that the <image-decl> comes first when we reintroduce the ltr/rtl
keywords and such.

~TJ
Received on Saturday, 5 May 2012 06:26:54 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:53 GMT