You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
as has been <ahref="https://lists.w3.org/Archives/Public/www-style/2011Mar/0729.html">suggested
359
360
elsewhere</a>.</p>
360
361
</div>
362
+
<h3class="heading settled" data-level="4.2" id="requirements-on-pending-style-changes"><spanclass="secno">4.2. </span><spanclass="content">Requirements on pending style changes</span><aclass="self-link" href="#requirements-on-pending-style-changes"></a></h3>
363
+
<p>Various operations may affect the <adata-link-type="dfn" href="https://drafts.csswg.org/css-cascade-4/#computed-value">computed values</a> of
364
+
properties on elements. User agents may, as an optimization, defer recomputing
365
+
these values until it becomes necessary.
366
+
However, all operations included in programming interface defined in this
367
+
specification, as well as those operations defined in Web Animations <adata-link-type="biblio" href="#biblio-web-animations">[WEB-ANIMATIONS]</a> that may return objects defined by this specification,
368
+
must produce a result consistent with having fully processed any such pending
369
+
changes to computed values.</p>
370
+
<divclass="note" role="note">
371
+
As an example, in the following code fragment, when the specified value of <code>elem</code>’s <aclass="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-color-4/#propdef-opacity">opacity</a> property is updated, a user agent may defer
372
+
recalculating the computed value of the <aclass="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-animations-1/#propdef-animation">animation</a> property.
373
+
<p>The first time this occurs, calling <codeclass="idl"><adata-link-type="idl" href="https://drafts.csswg.org/cssom-1/#dom-window-getcomputedstyle">getComputedStyle(elt)</a></code> and
374
+
subsequently accessing the <code>opacity</code> property of the result will
375
+
cause the user agent to recompute the value of opacity.</p>
376
+
<p>After the <aclass="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-color-4/#propdef-opacity">opacity</a> property is updated a second time, the <codeclass="idl"><adata-link-type="idl" href="http://www.w3.org/TR/web-animations/#dom-animatable-getanimations">getAnimations()</a></code> method is called on <code>elem</code>.
377
+
This method is specified by Web Animations and can return <codeclass="idl"><adata-link-type="idl" href="#csstransition">CSSTransition</a></code> objects as defined in this specification.
378
+
Hence, as result of the requirements in this section, the user agent must apply
379
+
any pending style changes thus generating a new <codeclass="idl"><adata-link-type="idl" href="#csstransition">CSSTransition</a></code> for the <aclass="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-color-4/#propdef-opacity">opacity</a> property before returning its result.</p>
<h3class="no-num heading settled" id="index-defined-elsewhere"><spanclass="content">Terms defined by reference</span><aclass="self-link" href="#index-defined-elsewhere"></a></h3>
524
552
<ulclass="indexlist">
553
+
<li>
554
+
<adata-link-type="biblio" href="#biblio-css-animations-1">[css-animations-1]</a> defines the following terms:
0 commit comments