W3C home > Mailing lists > Public > public-fx@w3.org > April to June 2014

[compositing] background-blend-mode on the root element

From: Rik Cabanier <cabanier@gmail.com>
Date: Thu, 19 Jun 2014 19:40:19 -0700
Message-ID: <CAGN7qDDwTS98CUKZA2ORHqh5QU7S6xAsBZR2yaZmVVyzc1twsQ@mail.gmail.com>
To: www-style list <www-style@w3.org>, "public-fx@w3.org" <public-fx@w3.org>

the background-blend-mode [1] property recently landed in Firefox and
Chrome and we noticed that a very common design is to use it to create
patterns with gradients. [2]

The spec states:

Each background layer must blend with the element’s background layer that
is below it and the element’s background color. Background layers must not
blend with the content that is behind the element, instead they must act as
if they are rendered into an isolated group.

This works for most elements except for the root element which has a
different paint order [3]:

The background of the root element becomes the background of the canvas and
covers the entire canvas, anchored (for 'background-position') at the same
point as it would be if it was painted only for the root element itself.
The root element does not paint this background again.

All browsers implement painting of the root backdrop by drawing the
background color and images on top of a 100% opaque white backdrop.
Because of this, background images that would blend with transparency
(which doesn't change the color), now blend with white and display

My question is, should we keep it as specified and make a note in the spec
that the root element behaves differently, or should we fix the
implementation so background images blend on a transparent backdrop
followed by matting and clarify the paint order in css colors?

I think authors would prefer the latter but they can work around it if

1: http://dev.w3.org/fxtf/compositing-1/#background-blend-mode
2: http://codepen.io/adobe/pen/6bc59f6e296119ff0282cd37a6fd3c22
3: http://www.w3.org/TR/CSS2/colors.html#background
Received on Friday, 20 June 2014 02:40:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:49:49 UTC