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

Re: Idea: background-image-frame attribute

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Fri, 30 Dec 2005 23:44:25 -0800
Message-ID: <002701c60dde$05a3a7b0$3201a8c0@Terra>
To: "L. David Baron" <dbaron@dbaron.org>, <www-style@w3.org>

Thanks, David,


----- Original Message ----- 
From: "L. David Baron" <dbaron@dbaron.org>

>On Thursday 2005-12-29 14:22 -0800, Andrew Fedoniouk wrote:
>>     background-image: url(nextpage.png);
>>     background-image-frame: 0px 0px 10px 10px;
>
>This has already been proposed for replaced elements:
>  http://www.w3.org/TR/2003/WD-css3-content-20030514/#the-crop
>and a more general solution that solves both problems at once (like the
>one proposed in [1]) would be vastly preferable to adding a new property
>for each property that accepts image values.  For example:
>
>  background-image: image-rect(nextpage.png, 0px, 0px, 10px, 10px);
>
>This value could then be used everywhere images can be used: 'content',
>'list-style-image', etc.

Agree, it is more reasonable. I was thinking about something similar.
The only concern I have here: url must be placed in url() brackets as
comma is a valid url symbol.

image-rect( url(some.jpg),  0px, 0px,  10px, 10px )

Ideally functions should support named  parameters:

background-image: bitmap (
    src: url(some.jpg),
    clip-left: 0px,
    clip-top: 0px,
    clip-width:10px,
    clip-height: 10px )

This is more generic as probably we may need to add more parameters in 
future
and some of them will be optional.

And in my opinion such things should be defined as rest of CSS, like:

background-image: bitmap  {
    src: url(some.jpg);
    clip-left: 0px;
    clip-top: 0px;
    clip-width:10px;
    clip-height: 10px;
  }

As in fact this is not a function in common sense but rather
definition of some structure. Function imply some physical action and 
returning
value which is not the case here I think.

>
>Putting multiple images into a single raster image file is a common
>technique in user-interface design and would improve the page loading
>performance.
>
>-David
>
>[1] https://bugzilla.mozilla.org/show_bug.cgi?id=113577#c3

Special thanks for the link.

Andrew Fedoniouk.
http://terrainformatica.com
Received on Saturday, 31 December 2005 07:44:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:42 GMT