W3C home > Mailing lists > Public > public-fx@w3.org > January to March 2015

Should filters on the root element affect the entire canvas?

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Tue, 10 Feb 2015 15:25:59 -0500
Message-ID: <54DA6957.9080406@mit.edu>
To: public-fx@w3.org
Consider this document:

<!DOCTYPE html>
<html style="filter: invert(90%);">
Some text

Note that in this document the <html> has a transparent background but a 
black text color by default in browsers.  The canvas has a white 
background by default in browsers.

The spec text says:

   Conceptually, any parts of the drawing are effected by filter
   operations. This includes any content, background, borders, text
   decoration, outline and visible scrolling mechanism of the element
   to which the filter is applied, and those of its descendants.

The canvas background is not part of the "element to which the filter is 
applied", so per the current spec this document should render with light 
gray text on a white background.

This is what Firefox does.  Chrome instead seems to make the canvas 
background black.

Which behavior do we want here?  What about other cases of filters being 
applied to the root element?  Do we want to effectively propagate these 
filters to the viewport, like CSS does with 'overflow' and backgrounds 
on the root element?

Received on Tuesday, 10 February 2015 20:26:31 UTC

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