Re: [will-change] Should will-change trigger stacking context when the property does not apply to an element?

On Sunday 2015-08-16 12:22 -0700, Simon Fraser wrote:
> > On Aug 16, 2015, at 12:17 pm, Simon Fraser <smfr@me.com> wrote:
> > 
> > Consider:
> > 
> > <span style=“will-change: transform;”>...<span>
> > 
> > The span, as a non-atomic inline, does not support the transform property. Should will-change trigger stacking context in this example?
> 
> A more compelling testcase is:
> 
> <div style=“will-change: z-index;"></div>
> 
> z-index only applies to positioned elements so does “will-change:z-index” alone create stacking context? If no, does this:
> 
> <div style=“will-change: position, z-index;"></div>?

Without having an opinion on whether it *should*, I'll comment that
Gecko currently causes the stacking context behavior when
will-change has any properties in a list of properties that can
cause stacking contexts, without considering whether they currently
apply.  (Our current list is clip-path, filter, isolation, mask,
mix-blend-mode, perspective, position, transform, transform-style,
and z-index; in the code this is the bit
CSS_PROPERTY_CREATES_STACKING_CONTEXT.)

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                          https://www.mozilla.org/   𝄂
             Before I built a wall I'd ask to know
             What I was walling in or walling out,
             And to whom I was like to give offense.
               - Robert Frost, Mending Wall (1914)

Received on Sunday, 16 August 2015 20:20:58 UTC