W3C home > Mailing lists > Public > www-style@w3.org > July 2011

Re: [css3-images] Gradient Magic

From: Brad Kemper <brad.kemper@gmail.com>
Date: Tue, 19 Jul 2011 18:00:15 -0700
Message-Id: <1161B330-2BE9-4F12-A020-7554625E6DAA@gmail.com>
Cc: Brian Manthos <brianman@microsoft.com>, Behnam Esfahbod ZWNJ <behnam@zwnj.org>, WWW-Style <www-style@w3.org>
To: "Tab Atkins Jr." <jackalmage@gmail.com>

On Jul 19, 2011, at 5:16 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:

> On Tue, Jul 19, 2011 at 3:59 PM, Brian Manthos <brianman@microsoft.com> wrote:
>> From: Tab Atkins Jr. [mailto:jackalmage@gmail.com]
>>> On Mon, Jul 18, 2011 at 10:56 PM, Behnam Esfahbod ZWNJ <behnam@zwnj.org> wrote:
>>>> The square-box-and-fill model works better with the "object-fit"
>>>> property and it's "fill" value. In fact, having a solution based on
>>>> the object-fit property, there is the possibility to support yet a few
>>>> more methods, like "cover", which is also impossible to implement
>>>> using the current features. Also, note that "object-fit: contain" is
>>>> equivalent to "45deg" or "135deg".
>>> 
>>> Are there any use-cases for such things?  They definitely
>>> *could* be done, but I cant' think of any reason why you'd
>>> want to.  It would be equivalent to you just specifying an
>>> angle directly (something of the form n*90deg + 45deg),
>>> with a bit of a scale thrown in.
>> 
>> Use case:  Applying the same linear-gradient value for background-image across boxes of different aspect ratios.
> 
> It seems like that can be done by just using <angle> for orientation
> and <percentage> for color-stop positions.

I'm confused, Brian. Doesn't 'background-size' take care of what you want? I don't know where object-fit comes into play. 
Received on Wednesday, 20 July 2011 01:01:30 GMT

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