Re: [css-backgrounds] Add opacity to <bg-layer> definition

On Fri, Feb 6, 2015 at 1:29 AM, Axel Dahmen <brille1@hotmail.com> wrote:
> "Tab Atkins Jr."  schrieb im Newsbeitrag
> news:CAAWBYDCE4ow4v-8kXzhC8GrvfXAqVepR2ojxf+OvEzsURQJ63g@mail.gmail.com...
>>
>> On Sun, Feb 1, 2015 at 6:44 PM, Axel Dahmen <brille1@hotmail.com> wrote:
>> > Can't use cross_fade() for this purpose, because you cannot apply >
>> > background
>> > attributes, like repeat, to cross_fade() images each.
>>
>> That's correct, but a non-sequitur.  I was suggesting cross-fade()
>> because it lets you create faded-out images.  (I think the
>> Webkit/Blink impl doesn't match the current spec, so it's a little
>> harder than it should be to do this; I think you have to manually
>> provide a transparent image, such as with a super simple data: url).
>> You can then use that faded-out image in background-image as normal.
>
> I apprehend, but wouldn't the opacity parameter be a reasonable addition to
> the <bg-layer> specification, though?

Lots of things might be reasonable.  But they all grow the language,
so it has to pass a higher bar of "significantly useful", particularly
if there are good workarounds already.

>> I suspect you thought I meant using cross-fade() to fade between the
>> two layer images?  If they're the same size/position/etc, you can do
>> that and it's nice and easy (and you don't even *need* to use
>> cross-fade() manually; the impls that support it will automatically
>> use it when you just do an animation/transition between two images).
>>
>> If they're not the same, then no, that won't work; you need to fade
>> each image separately with individual cross-fade()s.
>
>
> I don't quite apprehend. How would one add a semi-transparent watermark/logo
> image with a full background image by using cross-fade()?

Can you describe this example more fully?  I'm not sure I know what
you're asking about, exactly.

>> > Moreover, I'm missing a transition definition for cross_fade(). From the
>> > spec I understand that cross_fade() is only be used *within* a >
>> > transaction.
>>
>> No.  You can use cross-fade() wherever you want; it's just a type of
>> <image>, and is usable anywhere that <image>s are.  What part of the
>> spec suggests that it can only be used within a transition?
>
>
> It's "2.4. Combining images: the cross-fade() notation"
> (http://dev.w3.org/csswg/css-images-3/#cross-fade-function)
>
> "When transitioning between images, CSS requires a way to explicitly refer
> to the intermediate image that is a combination of the start and end images.
> This is accomplished with the cross-fade() function"

That's explanatory fluff text; there's nothing normative in that at all.

~TJ

Received on Thursday, 5 February 2015 19:59:18 UTC