Re: Clarification on filter inheritance

Russ,
The question you have is really a CSS question. The same issue applies to
any grammar which uses non-inheritable CSS properties, such as HTML. It
also applies to other non-inheritable properties in SVG, such as
'visibility' and 'opacity'. (Yikes! The current draft of the SVG spec
defines 'visibility' as inheritable! This is an error. The next public
draft will define 'visibility' as non-inheritable.)

Even if a property is defined as 'non-inheritable', that just means that
inheritance is turned off by default. You can still set a non-inheritable
property to 'inherit' to force a child to inherit a given property from its
parent.

Also, it is important to recognize that there are two distinct steps to
applying CSS properties. The first step is to determine the "specified
value" (see section 6.1.1 of the CSS2 spec) for each property on each
element. This first step is done according to the rules for CSS2 and
involves no particular knowledge of the language in question (in this case,
SVG). The second step is having the user agent apply that value in a
language-specific way.

Therefore, if you have the following:

   <g style="filter: url(#MyFilter)">
       <g style="filter: inherit">
          <path..../>
          <path..../>
      </g>
   </g>

After you do step 1, you end up with specified values for the filter
property as follows:

   <g style="filter: url(#MyFilter)">
       <g style="filter: url(#MyFilter)">
          <path..../>
          <path..../>
      </g>
   </g>

Then the rules of SVG apply. In this case, you would end up rendering the
two paths into an offscreen, then apply the inner filter, resulting in a
new offscreen. Then you apply the outer filter.

Jon

At 08:24 AM 4/12/00 -0500, Russ Shotts wrote:
>
>Section 15.1 states that 
>
>When applied to grouping elements such as 'g', the 'filter' property applies
>to the contents of the group as a whole.
>
>Section 15.4 states that the allowed values include  a uri, 'none' (the
>default), and 'inherit'.  It also states that the filter property is not
>inherited.
>
>Given the defined behavior, I would not expect 'inherit' to be a valid
>value.  If it is valid, I would like to know the expected behavior
>
>
>Russ Shotts
>Senior Software Engineer
>Jasc Software, Inc
> 

Received on Wednesday, 12 April 2000 10:25:12 UTC