Re: [css3-background] Implementation tips concerning algorithm for computing sizes of background images lacking intrinsic dimensions?

On Wed, Jan 12, 2011 at 11:18 AM, Jeff Walden <jwalden@mit.edu> wrote:
> Given the tests I have, I (reviewer's another matter) could probably (very,
> very grudgingly) live with the 8x algorithm size if that's what it takes to
> implement it correctly without excessively degrading readability.  But has
> anyone found a better way?  If anyone can post an outline of their stepwise
> background size algorithm that accounts for vector images, I'd be eternally
> grateful.

In the Image Values module I have an algorithm for sizing images,
which handles dimensionless images just fine (it has to, since some of
the new <image> values are dimensionless).

It does not, however, explicitly cover the various constraints that
the background-* properties can apply.  It has an entry point for them
(it treats them as "additional constraints"), but that's it.  I could
put one together if you want.

~TJ

Received on Wednesday, 12 January 2011 20:24:17 UTC