[css-will-change] First commit, prepping for FPWD.

Mon, 21 Apr 2014 17:39:45 -0700

author
Tab Atkins Jr. <jackalmage@gmail.com>
date
Mon, 21 Apr 2014 17:39:45 -0700
changeset 13782
6920f1f98916
parent 13781
739abfcf7fd0
child 13783
85a495c31ee3

[css-will-change] First commit, prepping for FPWD.

css-will-change/Overview.bs file | annotate | diff | comparison | revisions
css-will-change/Overview.html file | annotate | diff | comparison | revisions
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/css-will-change/Overview.bs	Mon Apr 21 17:39:45 2014 -0700
     1.3 @@ -0,0 +1,155 @@
     1.4 +<h1>CSS Will Change Module Level 1</h1>
     1.5 +
     1.6 +<pre class='metadata'>
     1.7 +Shortname: css-will-change
     1.8 +Level: 1
     1.9 +Status: FPWD
    1.10 +Group: CSSWG
    1.11 +ED: http://tabatkins.github.io/specs/css-will-change/
    1.12 +Abstract: This document defines the 'will-change' CSS property, which allows an author to inform the UA ahead of time of what kinds of changes they are likely to make to an element.  This allows the UA to optimize how they handle the element ahead of time, performing potentially-expensive work preparing for an animation before the animation actually begins.
    1.13 +Editor: Tab Atkins Jr., Google Inc., http://xanthir.com/contact/
    1.14 +Link Defaults: css-transforms-1 (property) transform
    1.15 +</pre>
    1.16 +
    1.17 +<h2 id='intro'>
    1.18 +Introduction</h2>
    1.19 +
    1.20 +	Modern CSS renderers perform a number of complex optimizations in order to render webpages quickly and efficiently.
    1.21 +	Unfortunately, employing these optimizations often has a non-trivial start-up cost,
    1.22 +	which can have a negative impact on the responsiveness of a page.
    1.23 +
    1.24 +	<div class='example'>
    1.25 +		For example, when using CSS 3D Transforms to move an element around the screen,
    1.26 +		the element and its contents might be promoted to a “layer”,
    1.27 +		where they can render independently from the rest of the page and be composited in later.
    1.28 +		This isolates the rendering of the content so that the rest of the page doesn't have to be rerendered
    1.29 +		if the element’s transform is the only thing that changes between frames,
    1.30 +		and often provides significant speed benefits.
    1.31 +
    1.32 +		However, setting up the element in a fresh layer is a relatively expensive operation,
    1.33 +		which can delay the start of a 'transform' animation by a noticeable fraction of a second.
    1.34 +	</div>
    1.35 +
    1.36 +	The 'will-change' property defined in this specification allows an author to declare ahead-of-time what properties are likely to change in the future,
    1.37 +	so the UA can set up the appropriate optimizations some time before they're needed.
    1.38 +	This way, when the actual change happens,
    1.39 +	the page updates in a snappy manner.
    1.40 +
    1.41 +<h2 id='will-change'>
    1.42 +Hinting at Future Behavior: the 'will-change' property</h2>
    1.43 +
    1.44 +	<pre class='propdef'>
    1.45 +	Name: will-change
    1.46 +	Value: auto | <<animateable-feature>>#
    1.47 +	Initial: auto
    1.48 +	Applies to: all elements
    1.49 +	Inherited: no
    1.50 +	Percentages: n/a
    1.51 +	Media: all
    1.52 +	Computed value: specified value
    1.53 +	</pre>
    1.54 +
    1.55 +	<pre class='prod'><dfn>&lt;animateable-feature></dfn> = scroll-position | contents | <<custom-ident>></pre>
    1.56 +
    1.57 +	The 'will-change' property provides a rendering hint to the user agent,
    1.58 +	stating what kinds of changes the author expects to perform on the element.
    1.59 +	This allows the user agent to perform ahead-of-time any optimizations necessary for rendering those changes smoothly,
    1.60 +	avoiding “jank” when the author does begin changing or animating that feature.
    1.61 +
    1.62 +	Values have the following meanings:
    1.63 +
    1.64 +	<dl dfn-for="will-change" dfn-type="value">
    1.65 +		<dt><dfn>auto</dfn>
    1.66 +		<dd>
    1.67 +			Expresses no particular intent;
    1.68 +			the user agent should apply whatever heuristics and optimizations it normally does.
    1.69 +
    1.70 +		<dt><dfn>scroll-position</dfn>
    1.71 +		<dd>
    1.72 +			Indicates that the author expects to animate or change the scroll position of the element in the near future.
    1.73 +
    1.74 +			<p class='example'>
    1.75 +				For example, browsers often only render the content in the "scroll window" on a scrollable element,
    1.76 +				and some of the content past that window,
    1.77 +				balancing memory and time savings from the skipped rendering against making scrolling look nice.
    1.78 +				A browser might take this value as a signal to expand the range of content around the scroll window that is rendered,
    1.79 +				so that longer/faster scrolls can be done smoothly.
    1.80 +
    1.81 +		<dt><dfn>contents</dfn>
    1.82 +		<dd>
    1.83 +			Indicates that the author expects to animate or change something about the element's contents in the near future.
    1.84 +
    1.85 +			<p class='example'>
    1.86 +				For example, browsers often “cache” rendering of elements over time,
    1.87 +				because most things don't change very often,
    1.88 +				or only change their position.
    1.89 +				However, if an element *does* change its contents regularly,
    1.90 +				producing and maintaining this cache is a waste of time.
    1.91 +				A browser might take this value as a signal to cache less aggressively on the element,
    1.92 +				or avoid caching at all and just continually re-render the element from scratch.
    1.93 +
    1.94 +		<dt><dfn><<custom-ident>></dfn>
    1.95 +		<dd>
    1.96 +			Indicates that the author expects to animate or change the property with the given name on the element in the near future.
    1.97 +
    1.98 +			The <<custom-ident>> production used here excludes the keywords ''will-change'', ''none'', ''all'', ''auto'', ''scroll-position'', and ''contents'',
    1.99 +			in addition to the keywords normally excluded from <<custom-ident>>.
   1.100 +
   1.101 +			Note: Note that most properties will have no effect when specified,
   1.102 +			as the user agent doesn't perform any special optimizations for changes in most properties.
   1.103 +			It is still <em>safe</em> to specify them, though;
   1.104 +			it'll simply have no effect.
   1.105 +
   1.106 +			If any non-initial value of a property would create a stacking context on the element,
   1.107 +			specifying that property in 'will-change' must create a stacking context on the element.
   1.108 +
   1.109 +			If any non-initial value of a property would cause the element to generate a containing block for fixed-position elements,
   1.110 +			specifying that property in 'will-change' must cause the element to generate a containing block for fixed-position elements.
   1.111 +
   1.112 +			If a non-initial value of a property would cause rendering differences on the element
   1.113 +			(such as using a different anti-aliasing strategy for text),
   1.114 +			the user agent should use that alternate rendering when the property is specified in 'will-change',
   1.115 +			to avoid sudden rendering differences when the property is eventually changed.
   1.116 +
   1.117 +			<p class='example'>
   1.118 +				For example, browsers often handle elements with 'transform' set to a non-initial value very differently from normal elements,
   1.119 +				perhaps rendering them to their own “GPU layer”
   1.120 +				or using other mechanisms to make it easier to quickly make the sort of transformations that 'transform' can produce.
   1.121 +				A browser might take a value of 'transform' as a signal
   1.122 +				that it should go ahead and promote the element to its own layer immediately,
   1.123 +				before the element starts to be transformed,
   1.124 +				to avoid any delay involved in rerendering the old and new layers.
   1.125 +	</dl>
   1.126 +
   1.127 +
   1.128 +	<div class='example'>
   1.129 +		For example, setting 'opacity' to any value other than ''1'' creates a stacking context on the element.
   1.130 +		Thus, setting ''will-change: opacity'' also creates a stacking context,
   1.131 +		even if 'opacity' is <em>currently</em> still equal to ''1''.
   1.132 +	</div>
   1.133 +
   1.134 +	The 'will-change' property has no <em>direct</em> effect on the element it is specified on,
   1.135 +	beyond the creation of stacking contexts and containing blocks as specified above.
   1.136 +	It is solely a rendering hint to the user agent,
   1.137 +	allowing it set up potentially-expensive optimizations for certain types of changes
   1.138 +	before the changes actually start occurring.
   1.139 +
   1.140 +	<div class='note'>
   1.141 +		Different browsers can use the information from 'will-change' in different ways,
   1.142 +		and even a single browser might use it in different ways at different time.
   1.143 +		For example, a browser that promotes elements to their own “GPU layer”
   1.144 +		when they have ''will-change: transform'' specified
   1.145 +		might avoid doing that when there are <em>too many</em> elements declaring that,
   1.146 +		to avoid exhausting GPU memory.
   1.147 +
   1.148 +		Authors should avoid overusing this property,
   1.149 +		and shouldn't apply it to an element unless it is known (or expected)
   1.150 +		that the element will change in the indicated way soon.
   1.151 +		For example, applying 'will-change' to an element from a static CSS stylesheet
   1.152 +		is probably an error;
   1.153 +		most of the time,
   1.154 +		'will-change' should be applied by scripting,
   1.155 +		some time shortly before starting an animation or other change,
   1.156 +		and should be promptly reset to its initial value of ''auto''
   1.157 +		when the element stops changing.
   1.158 +	</div>
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/css-will-change/Overview.html	Mon Apr 21 17:39:45 2014 -0700
     2.3 @@ -0,0 +1,369 @@
     2.4 +<!DOCTYPE html><html lang=en><head>
     2.5 +  <meta content="text/html; charset=utf-8" http-equiv=Content-Type>
     2.6 +  <title>CSS Will Change Module Level 1</title>
     2.7 +  <link href=../default.css rel=stylesheet type=text/css>
     2.8 +  <link href=../csslogo.ico rel="shortcut icon" type=image/x-icon>
     2.9 +  <link href=https://www.w3.org/StyleSheets/TR/W3C-WD rel=stylesheet type=text/css>
    2.10 +</head>
    2.11 +<body class=h-entry>
    2.12 +<div class=head>
    2.13 +  <p data-fill-with=logo><a class=logo href=http://www.w3.org/>
    2.14 +    <img alt=W3C height=48 src=http://www.w3.org/Icons/w3c_home width=72>
    2.15 +</a>
    2.16 +</p>
    2.17 +  <h1 class="p-name no-ref" id=title>CSS Will Change Module Level 1</h1>
    2.18 +  <h2 class="no-num no-toc no-ref heading settled heading" id=subtitle><span class=content>W3C First Public Working Draft,
    2.19 +    <span class=dt-updated><span class=value-title title=20140422>22 April 2014</span></span></span></h2>
    2.20 +  <div data-fill-with=spec-metadata><dl><dt>This version:<dd><a class=u-url href=http://www.w3.org/TR/2014/WD-css-will-change-1-20140422/>http://www.w3.org/TR/2014/WD-css-will-change-1-20140422/</a><dt>Editor’s Draft:<dd><a href=http://tabatkins.github.io/specs/css-will-change/>http://tabatkins.github.io/specs/css-will-change/</a>
    2.21 +    <dt>Feedback:</dt>
    2.22 +        <dd><a href="mailto:www-style@w3.org?subject=%5Bcss-will-change%5D%20feedback">www-style@w3.org</a>
    2.23 +            with subject line
    2.24 +            “<kbd>[css-will-change] <var>… message topic …</var></kbd>”(<a href=http://lists.w3.org/Archives/Public/www-style/ rel=discussion>archives</a>)<dt>Test Suite:<dd>None Yet<dt>Editors:
    2.25 +<dd class="p-author h-card vcard"><a class="p-name fn u-url url" href=http://xanthir.com/contact/>Tab Atkins Jr.</a> (<span class="p-org org">Google Inc.</span>)</dl></div>
    2.26 +  <div data-fill-with=warning></div>
    2.27 +  <p class=copyright data-fill-with=copyright><a href=http://www.w3.org/Consortium/Legal/ipr-notice#Copyright>Copyright</a> © 2014 <a href=http://www.w3.org/><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href=http://www.csail.mit.edu/><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href=http://www.ercim.eu/><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href=http://www.keio.ac.jp/>Keio</a>, <a href=http://ev.buaa.edu.cn/>Beihang</a>), All Rights Reserved. W3C <a href=http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer>liability</a>, <a href=http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks>trademark</a> and <a href=http://www.w3.org/Consortium/Legal/copyright-documents>document use</a> rules apply.
    2.28 +</p>
    2.29 +  <hr title="Separator for header">
    2.30 +</div>
    2.31 +
    2.32 +<h2 class="no-num no-toc no-ref heading settled heading" id=abstract><span class=content>Abstract</span></h2>
    2.33 +<p class=p-summary data-fill-with=abstract>This document defines the <a class=property data-link-type=propdesc href=#propdef-will-change title=will-change>will-change</a> CSS property, which allows an author to inform the UA ahead of time of what kinds of changes they are likely to make to an element.  This allows the UA to optimize how they handle the element ahead of time, performing potentially-expensive work preparing for an animation before the animation actually begins.
    2.34 +<a href=http://www.w3.org/TR/CSS/>CSS</a> is a language for describing the rendering of structured documents 
    2.35 +(such as HTML and XML) 
    2.36 +on screen, on paper, in speech, etc.</p>
    2.37 +
    2.38 +<h2 class="no-num no-toc no-ref heading settled heading" id=status><span class=content>Status of this document</span></h2>
    2.39 +<div data-fill-with=status><p><em>This section describes the status of this document at the time of
    2.40 +   its publication. Other documents may supersede this document. A list of
    2.41 +   current W3C publications and the latest revision of this technical report
    2.42 +   can be found in the <a href=http://www.w3.org/TR/>W3C technical reports
    2.43 +   index at http://www.w3.org/TR/.</a></em>
    2.44 +
    2.45 +  <p>This document is a <b>First Public Working Draft</b>.
    2.46 +
    2.47 +  <p>Publication as a First Public  Working Draft does not imply endorsement by the W3C
    2.48 +   Membership. This is a draft document and may be updated, replaced or
    2.49 +   obsoleted by other documents at any time. It is inappropriate to cite this
    2.50 +   document as other than work in progress.
    2.51 +
    2.52 +  <p>The (<a href=http://lists.w3.org/Archives/Public/www-style/>archived</a>) public
    2.53 +   mailing list <a href=mailto:www-style@w3.org>www-style@w3.org</a> (see
    2.54 +   <a href=http://www.w3.org/Mail/Request>instructions</a>) is preferred
    2.55 +   for discussion of this specification. When sending e-mail, please put the
    2.56 +   text “css-will-change” in the subject, preferably like this:
    2.57 +   “[css-will-change] <em>…summary of comment…</em>”
    2.58 +
    2.59 +  <p>This document was produced by the <a href=http://www.w3.org/Style/CSS/members>CSS Working Group</a> (part of
    2.60 +   the <a href=http://www.w3.org/Style/>Style Activity</a>).
    2.61 +
    2.62 +  <p>This document was produced by a group operating under the <a href=http://www.w3.org/Consortium/Patent-Policy-20040205/>5 February
    2.63 +   2004 W3C Patent Policy</a>. W3C maintains a <a href=http://www.w3.org/2004/01/pp-impl/32061/status rel=disclosure>public list of any patent disclosures</a> made in
    2.64 +   connection with the deliverables of the group; that page also includes
    2.65 +   instructions for disclosing a patent. An individual who has actual
    2.66 +   knowledge of a patent which the individual believes contains <a href=http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential>Essential
    2.67 +   Claim(s)</a> must disclose the information in accordance with <a href=http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure>section
    2.68 +   6 of the W3C Patent Policy</a>.</p>
    2.69 +</div>
    2.70 +<div data-fill-with=at-risk></div>
    2.71 +
    2.72 +<h2 class="no-num no-toc no-ref heading settled heading" id=contents><span class=content>Table of Contents</span></h2>
    2.73 +<div data-fill-with=table-of-contents><ul class=toc>
    2.74 +	<li><a href=#intro><span class=secno>1</span> Introduction</a>
    2.75 +	<li><a href=#will-change><span class=secno>2</span> Hinting at Future Behavior: the <span class=property data-link-type=propdesc title=will-change>will-change</span> property</a>
    2.76 +	<li><a href=#conformance><span class=secno></span> Conformance</a>
    2.77 +		<ul class=toc>
    2.78 +		<li><a href=#conventions><span class=secno></span> Document conventions</a>
    2.79 +		<li><a href=#conformance-classes><span class=secno></span> Conformance classes</a>
    2.80 +		<li><a href=#partial><span class=secno></span> Partial implementations</a>
    2.81 +		<li><a href=#experimental><span class=secno></span> Experimental implementations</a>
    2.82 +		<li><a href=#testing><span class=secno></span> Non-experimental implementations</a></ul>
    2.83 +	<li><a href=#references><span class=secno></span> References</a>
    2.84 +		<ul class=toc>
    2.85 +		<li><a href=#normative><span class=secno></span> Normative References</a>
    2.86 +		<li><a href=#informative><span class=secno></span> Informative References</a></ul>
    2.87 +	<li><a href=#index><span class=secno></span> Index</a>
    2.88 +	<li><a href=#property-index><span class=secno></span> Property index</a></ul></div>
    2.89 +
    2.90 +
    2.91 +
    2.92 +
    2.93 +<h2 class="heading settled heading" data-level=1 id=intro><span class=secno>1 </span><span class=content>
    2.94 +Introduction</span><a class=self-link href=#intro></a></h2>
    2.95 +
    2.96 +<p>	Modern CSS renderers perform a number of complex optimizations in order to render webpages quickly and efficiently.
    2.97 +	Unfortunately, employing these optimizations often has a non-trivial start-up cost,
    2.98 +	which can have a negative impact on the responsiveness of a page.
    2.99 +
   2.100 +	<div class=example>
   2.101 +		For example, when using CSS 3D Transforms to move an element around the screen,
   2.102 +		the element and its contents might be promoted to a “layer”,
   2.103 +		where they can render independently from the rest of the page and be composited in later.
   2.104 +		This isolates the rendering of the content so that the rest of the page doesn’t have to be rerendered
   2.105 +		if the element’s transform is the only thing that changes between frames,
   2.106 +		and often provides significant speed benefits.
   2.107 +
   2.108 +<p>		However, setting up the element in a fresh layer is a relatively expensive operation,
   2.109 +		which can delay the start of a <a class=property data-link-type=propdesc href=http://www.w3.org/TR/css3-transforms/#propdef-transform title=transform>transform</a> animation by a noticeable fraction of a second.
   2.110 +	</div>
   2.111 +
   2.112 +<p>	The <a class=property data-link-type=propdesc href=#propdef-will-change title=will-change>will-change</a> property defined in this specification allows an author to declare ahead-of-time what properties are likely to change in the future,
   2.113 +	so the UA can set up the appropriate optimizations some time before they’re needed.
   2.114 +	This way, when the actual change happens,
   2.115 +	the page updates in a snappy manner.
   2.116 +
   2.117 +<h2 class="heading settled heading" data-level=2 id=will-change><span class=secno>2 </span><span class=content>
   2.118 +Hinting at Future Behavior: the <a class=property data-link-type=propdesc href=#propdef-will-change title=will-change>will-change</a> property</span><a class=self-link href=#will-change></a></h2>
   2.119 +
   2.120 +<table class="definition propdef"><tr><th>Name:<td><dfn class=css-code data-dfn-type=property data-export="" id=propdef-will-change>will-change<a class=self-link href=#propdef-will-change></a></dfn><tr><th>Value:<td class=prod>auto | <a class="production css-code" data-link-type=type href=#typedef-animateable-feature title="<animateable-feature>">&lt;animateable-feature&gt;</a>#<tr><th>Initial:<td>auto<tr><th>Applies to:<td>all elements<tr><th>Inherited:<td>no<tr><th>Media:<td>all<tr><th>Computed value:<td>specified value<tr><th>Percentages:<td>n/a</table>
   2.121 +<pre class=prod><dfn class=css-code data-dfn-type=type data-export="" id=typedef-animateable-feature>&lt;animateable-feature&gt;<a class=self-link href=#typedef-animateable-feature></a></dfn> = scroll-position | contents | <a class="production css-code" data-link-type=type href=http://www.w3.org/TR/css3-values/#identifier-value title="<custom-ident>">&lt;custom-ident&gt;</a></pre>
   2.122 +<p>	The <a class=property data-link-type=propdesc href=#propdef-will-change title=will-change>will-change</a> property provides a rendering hint to the user agent,
   2.123 +	stating what kinds of changes the author expects to perform on the element.
   2.124 +	This allows the user agent to perform ahead-of-time any optimizations necessary for rendering those changes smoothly,
   2.125 +	avoiding “jank” when the author does begin changing or animating that feature.
   2.126 +
   2.127 +<p>	Values have the following meanings:
   2.128 +
   2.129 +	<dl data-dfn-for=will-change data-dfn-type=value>
   2.130 +		<dt><dfn class=css-code data-dfn-for=will-change data-dfn-type=value data-export="" id=valuedef-auto>auto<a class=self-link href=#valuedef-auto></a></dfn>
   2.131 +		<dd>
   2.132 +			Expresses no particular intent;
   2.133 +			the user agent should apply whatever heuristics and optimizations it normally does.
   2.134 +
   2.135 +		<dt><dfn class=css-code data-dfn-for=will-change data-dfn-type=value data-export="" id=valuedef-scroll-position>scroll-position<a class=self-link href=#valuedef-scroll-position></a></dfn>
   2.136 +		<dd>
   2.137 +			Indicates that the author expects to animate or change the scroll position of the element in the near future.
   2.138 +
   2.139 +			<p class=example>
   2.140 +				For example, browsers often only render the content in the "scroll window" on a scrollable element,
   2.141 +				and some of the content past that window,
   2.142 +				balancing memory and time savings from the skipped rendering against making scrolling look nice.
   2.143 +				A browser might take this value as a signal to expand the range of content around the scroll window that is rendered,
   2.144 +				so that longer/faster scrolls can be done smoothly.
   2.145 +
   2.146 +		<dt><dfn class=css-code data-dfn-for=will-change data-dfn-type=value data-export="" id=valuedef-contents>contents<a class=self-link href=#valuedef-contents></a></dfn>
   2.147 +		<dd>
   2.148 +			Indicates that the author expects to animate or change something about the element’s contents in the near future.
   2.149 +
   2.150 +			<p class=example>
   2.151 +				For example, browsers often “cache” rendering of elements over time,
   2.152 +				because most things don’t change very often,
   2.153 +				or only change their position.
   2.154 +				However, if an element *does* change its contents regularly,
   2.155 +				producing and maintaining this cache is a waste of time.
   2.156 +				A browser might take this value as a signal to cache less aggressively on the element,
   2.157 +				or avoid caching at all and just continually re-render the element from scratch.
   2.158 +
   2.159 +		<dt><dfn class=css-code data-dfn-for=will-change data-dfn-type=value data-export="" id=valuedef-custom-ident><a class="production css-code" data-link-type=type href=http://www.w3.org/TR/css3-values/#identifier-value title="<custom-ident>">&lt;custom-ident&gt;</a><a class=self-link href=#valuedef-custom-ident></a></dfn>
   2.160 +		<dd>
   2.161 +			Indicates that the author expects to animate or change the property with the given name on the element in the near future.
   2.162 +
   2.163 +<p>			The <a class="production css-code" data-link-type=type href=http://www.w3.org/TR/css3-values/#identifier-value title="<custom-ident>">&lt;custom-ident&gt;</a> production used here excludes the keywords <span class=css data-link-type=maybe title=will-change>will-change</span>, <span class=css data-link-type=maybe title=none>none</span>, <span class=css data-link-type=maybe title=all>all</span>, <a class=css data-link-type=maybe href=#valuedef-auto title=auto>auto</a>, <a class=css data-link-type=maybe href=#valuedef-scroll-position title=scroll-position>scroll-position</a>, and <a class=css data-link-type=maybe href=#valuedef-contents title=contents>contents</a>,
   2.164 +			in addition to the keywords normally excluded from <a class="production css-code" data-link-type=type href=http://www.w3.org/TR/css3-values/#identifier-value title="<custom-ident>">&lt;custom-ident&gt;</a>.
   2.165 +
   2.166 +<p class=note>			Note: Note that most properties will have no effect when specified,
   2.167 +			as the user agent doesn’t perform any special optimizations for changes in most properties.
   2.168 +			It is still <em>safe</em> to specify them, though;
   2.169 +			it’ll simply have no effect.
   2.170 +
   2.171 +<p>			If any non-initial value of a property would create a stacking context on the element,
   2.172 +			specifying that property in <a class=property data-link-type=propdesc href=#propdef-will-change title=will-change>will-change</a> must create a stacking context on the element.
   2.173 +
   2.174 +<p>			If any non-initial value of a property would cause the element to generate a containing block for fixed-position elements,
   2.175 +			specifying that property in <a class=property data-link-type=propdesc href=#propdef-will-change title=will-change>will-change</a> must cause the element to generate a containing block for fixed-position elements.
   2.176 +
   2.177 +<p>			If a non-initial value of a property would cause rendering differences on the element
   2.178 +			(such as using a different anti-aliasing strategy for text),
   2.179 +			the user agent should use that alternate rendering when the property is specified in <a class=property data-link-type=propdesc href=#propdef-will-change title=will-change>will-change</a>,
   2.180 +			to avoid sudden rendering differences when the property is eventually changed.
   2.181 +
   2.182 +			<p class=example>
   2.183 +				For example, browsers often handle elements with <a class=property data-link-type=propdesc href=http://www.w3.org/TR/css3-transforms/#propdef-transform title=transform>transform</a> set to a non-initial value very differently from normal elements,
   2.184 +				perhaps rendering them to their own “GPU layer”
   2.185 +				or using other mechanisms to make it easier to quickly make the sort of transformations that <a class=property data-link-type=propdesc href=http://www.w3.org/TR/css3-transforms/#propdef-transform title=transform>transform</a> can produce.
   2.186 +				A browser might take a value of <a class=property data-link-type=propdesc href=http://www.w3.org/TR/css3-transforms/#propdef-transform title=transform>transform</a> as a signal
   2.187 +				that it should go ahead and promote the element to its own layer immediately,
   2.188 +				before the element starts to be transformed,
   2.189 +				to avoid any delay involved in rerendering the old and new layers.
   2.190 +	</dl>
   2.191 +
   2.192 +
   2.193 +	<div class=example>
   2.194 +		For example, setting <a class=property data-link-type=propdesc href=http://www.w3.org/TR/css3-color/#opacity title=opacity>opacity</a> to any value other than <span class=css data-link-type=maybe title=1>1</span> creates a stacking context on the element.
   2.195 +		Thus, setting <a class=css data-link-type=propdesc href=#propdef-will-change title=will-change>will-change: opacity</a> also creates a stacking context,
   2.196 +		even if <a class=property data-link-type=propdesc href=http://www.w3.org/TR/css3-color/#opacity title=opacity>opacity</a> is <em>currently</em> still equal to <span class=css data-link-type=maybe title=1>1</span>.
   2.197 +	</div>
   2.198 +
   2.199 +<p>	The <a class=property data-link-type=propdesc href=#propdef-will-change title=will-change>will-change</a> property has no <em>direct</em> effect on the element it is specified on,
   2.200 +	beyond the creation of stacking contexts and containing blocks as specified above.
   2.201 +	It is solely a rendering hint to the user agent,
   2.202 +	allowing it set up potentially-expensive optimizations for certain types of changes
   2.203 +	before the changes actually start occurring.
   2.204 +
   2.205 +	<div class=note>
   2.206 +		Different browsers can use the information from <a class=property data-link-type=propdesc href=#propdef-will-change title=will-change>will-change</a> in different ways,
   2.207 +		and even a single browser might use it in different ways at different time.
   2.208 +		For example, a browser that promotes elements to their own “GPU layer”
   2.209 +		when they have <a class=css data-link-type=propdesc href=#propdef-will-change title=will-change>will-change: transform</a> specified
   2.210 +		might avoid doing that when there are <em>too many</em> elements declaring that,
   2.211 +		to avoid exhausting GPU memory.
   2.212 +
   2.213 +<p>		Authors should avoid overusing this property,
   2.214 +		and shouldn’t apply it to an element unless it is known (or expected)
   2.215 +		that the element will change in the indicated way soon.
   2.216 +		For example, applying <a class=property data-link-type=propdesc href=#propdef-will-change title=will-change>will-change</a> to an element from a static CSS stylesheet
   2.217 +		is probably an error;
   2.218 +		most of the time,
   2.219 +		<a class=property data-link-type=propdesc href=#propdef-will-change title=will-change>will-change</a> should be applied by scripting,
   2.220 +		some time shortly before starting an animation or other change,
   2.221 +		and should be promptly reset to its initial value of <a class=css data-link-type=maybe href=#valuedef-auto title=auto>auto</a>
   2.222 +		when the element stops changing.
   2.223 +	</div>
   2.224 +
   2.225 +<h2 class="no-ref no-num heading settled heading" id=conformance><span class=content>
   2.226 +Conformance</span><a class=self-link href=#conformance></a></h2>
   2.227 +
   2.228 +<h3 class="no-ref heading settled heading" id=conventions><span class=content>
   2.229 +Document conventions</span><a class=self-link href=#conventions></a></h3>
   2.230 +
   2.231 +    <p>Conformance requirements are expressed with a combination of
   2.232 +    descriptive assertions and RFC 2119 terminology. The key words "MUST",
   2.233 +    "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT",
   2.234 +    "RECOMMENDED", "MAY", and "OPTIONAL" in the normative parts of this
   2.235 +    document are to be interpreted as described in RFC 2119.
   2.236 +    However, for readability, these words do not appear in all uppercase
   2.237 +    letters in this specification.
   2.238 +
   2.239 +    <p>All of the text of this specification is normative except sections
   2.240 +    explicitly marked as non-normative, examples, and notes. <a data-biblio-type=normative data-link-type=biblio href=#rfc2119 title=rfc2119>[RFC2119]</a></p>
   2.241 +
   2.242 +    <p>Examples in this specification are introduced with the words "for example"
   2.243 +    or are set apart from the normative text with <code>class="example"</code>,
   2.244 +    like this:
   2.245 +
   2.246 +    <div class=example>
   2.247 +        <p>This is an example of an informative example.</p>
   2.248 +    </div>
   2.249 +
   2.250 +    <p>Informative notes begin with the word "Note" and are set apart from the
   2.251 +    normative text with <code>class="note"</code>, like this:
   2.252 +
   2.253 +    <p class=note>Note, this is an informative note.</p>
   2.254 +
   2.255 +<h3 class="no-ref heading settled heading" id=conformance-classes><span class=content>
   2.256 +Conformance classes</span><a class=self-link href=#conformance-classes></a></h3>
   2.257 +
   2.258 +    <p>Conformance to this specification
   2.259 +    is defined for three conformance classes:
   2.260 +    <dl>
   2.261 +        <dt>style sheet
   2.262 +            <dd>A <a href=http://www.w3.org/TR/CSS21/conform.html#style-sheet>CSS
   2.263 +            style sheet</a>.
   2.264 +        <dt>renderer
   2.265 +            <dd>A <a href=http://www.w3.org/TR/CSS21/conform.html#user-agent>UA</a>
   2.266 +            that interprets the semantics of a style sheet and renders
   2.267 +            documents that use them.
   2.268 +        <dt>authoring tool
   2.269 +            <dd>A <a href=http://www.w3.org/TR/CSS21/conform.html#user-agent>UA</a>
   2.270 +            that writes a style sheet.
   2.271 +    </dl>
   2.272 +
   2.273 +    <p>A style sheet is conformant to this specification
   2.274 +    if all of its statements that use syntax defined in this module are valid
   2.275 +    according to the generic CSS grammar and the individual grammars of each
   2.276 +    feature defined in this module.
   2.277 +
   2.278 +    <p>A renderer is conformant to this specification
   2.279 +    if, in addition to interpreting the style sheet as defined by the
   2.280 +    appropriate specifications, it supports all the features defined
   2.281 +    by this specification by parsing them correctly
   2.282 +    and rendering the document accordingly. However, the inability of a
   2.283 +    UA to correctly render a document due to limitations of the device
   2.284 +    does not make the UA non-conformant. (For example, a UA is not
   2.285 +    required to render color on a monochrome monitor.)
   2.286 +
   2.287 +    <p>An authoring tool is conformant to this specification
   2.288 +    if it writes style sheets that are syntactically correct according to the
   2.289 +    generic CSS grammar and the individual grammars of each feature in
   2.290 +    this module, and meet all other conformance requirements of style sheets
   2.291 +    as described in this module.
   2.292 +
   2.293 +<h3 class="no-ref heading settled heading" id=partial><span class=content>
   2.294 +Partial implementations</span><a class=self-link href=#partial></a></h3>
   2.295 +
   2.296 +    <p>So that authors can exploit the forward-compatible parsing rules to
   2.297 +    assign fallback values, CSS renderers <strong>must</strong>
   2.298 +    treat as invalid (and <a href=http://www.w3.org/TR/CSS21/conform.html#ignore>ignore
   2.299 +    as appropriate</a>) any at-rules, properties, property values, keywords,
   2.300 +    and other syntactic constructs for which they have no usable level of
   2.301 +    support. In particular, user agents <strong>must not</strong> selectively
   2.302 +    ignore unsupported component values and honor supported values in a single
   2.303 +    multi-value property declaration: if any value is considered invalid
   2.304 +    (as unsupported values must be), CSS requires that the entire declaration
   2.305 +    be ignored.</p>
   2.306 +
   2.307 +<h3 class="no-ref heading settled heading" id=experimental><span class=content>
   2.308 +Experimental implementations</span><a class=self-link href=#experimental></a></h3>
   2.309 +
   2.310 +    <p>To avoid clashes with future CSS features, the CSS2.1 specification
   2.311 +    reserves a <a href=http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords>prefixed
   2.312 +    syntax</a> for proprietary and experimental extensions to CSS.
   2.313 +
   2.314 +    <p>Prior to a specification reaching the Candidate Recommendation stage
   2.315 +    in the W3C process, all implementations of a CSS feature are considered
   2.316 +    experimental. The CSS Working Group recommends that implementations
   2.317 +    use a vendor-prefixed syntax for such features, including those in
   2.318 +    W3C Working Drafts. This avoids incompatibilities with future changes
   2.319 +    in the draft.
   2.320 +    </p>
   2.321 +
   2.322 +<h3 class="no-ref heading settled heading" id=testing><span class=content>
   2.323 +Non-experimental implementations</span><a class=self-link href=#testing></a></h3>
   2.324 +
   2.325 +    <p>Once a specification reaches the Candidate Recommendation stage,
   2.326 +    non-experimental implementations are possible, and implementors should
   2.327 +    release an unprefixed implementation of any CR-level feature they
   2.328 +    can demonstrate to be correctly implemented according to spec.
   2.329 +
   2.330 +    <p>To establish and maintain the interoperability of CSS across
   2.331 +    implementations, the CSS Working Group requests that non-experimental
   2.332 +    CSS renderers submit an implementation report (and, if necessary, the
   2.333 +    testcases used for that implementation report) to the W3C before
   2.334 +    releasing an unprefixed implementation of any CSS features. Testcases
   2.335 +    submitted to W3C are subject to review and correction by the CSS
   2.336 +    Working Group.
   2.337 +
   2.338 +    <p>Further information on submitting testcases and implementation reports
   2.339 +    can be found from on the CSS Working Group’s website at
   2.340 +    <a href=http://www.w3.org/Style/CSS/Test/>http://www.w3.org/Style/CSS/Test/</a>.
   2.341 +    Questions should be directed to the
   2.342 +    <a href=http://lists.w3.org/Archives/Public/public-css-testsuite>public-css-testsuite@w3.org</a>
   2.343 +    mailing list.
   2.344 +
   2.345 +<h2 class="no-num no-ref heading settled heading" id=references><span class=content>
   2.346 +References</span><a class=self-link href=#references></a></h2>
   2.347 +
   2.348 +<h3 class="no-num no-ref heading settled heading" id=normative><span class=content>
   2.349 +Normative References</span><a class=self-link href=#normative></a></h3>
   2.350 +<div data-fill-with=normative-references><dl><dt id=rfc2119 title=RFC2119><a class=self-link href=#rfc2119></a>[RFC2119]<dd>S. Bradner. <a href=http://www.ietf.org/rfc/rfc2119.txt>Key words for use in RFCs to Indicate Requirement Levels</a>. URL: <a href=http://www.ietf.org/rfc/rfc2119.txt>http://www.ietf.org/rfc/rfc2119.txt</a></dl></div>
   2.351 +
   2.352 +<h3 class="no-num no-ref heading settled heading" id=informative><span class=content>
   2.353 +Informative References</span><a class=self-link href=#informative></a></h3>
   2.354 +<div data-fill-with=informative-references><dl></dl></div>
   2.355 +
   2.356 +<h2 class="no-num no-ref heading settled heading" id=index><span class=content>
   2.357 +Index</span><a class=self-link href=#index></a></h2>
   2.358 +<div data-fill-with=index><ul class=indexlist>
   2.359 +<li>&lt;animateable-feature&gt;, <a href=#typedef-animateable-feature title="section 2">2</a>
   2.360 +<li>auto, <a href=#valuedef-auto title="section 2">2</a>
   2.361 +<li>contents, <a href=#valuedef-contents title="section 2">2</a>
   2.362 +<li>&lt;custom-ident&gt;, <a href=#valuedef-custom-ident title="section 2">2</a>
   2.363 +<li>scroll-position, <a href=#valuedef-scroll-position title="section 2">2</a>
   2.364 +<li>will-change, <a href=#propdef-will-change title="section 2">2</a>
   2.365 +</ul></div>
   2.366 +
   2.367 +<h2 class="no-num no-ref heading settled heading" id=property-index><span class=content>
   2.368 +Property index</span><a class=self-link href=#property-index></a></h2>
   2.369 +<div data-fill-with=property-index><table class="proptable data"><thead><tr><th scope=col>Name<th scope=col>Value<th scope=col>Initial<th scope=col>Applies to<th scope=col>Inh.<th scope=col>%ages<th scope=col>Media<th scope=col>Computed value<tbody>
   2.370 +<tr><th scope=row><a class=css-code data-link-type=property href=#propdef-will-change title=will-change>will-change</a><td>auto | &lt;animateable-feature&gt;#<td>auto<td>all elements<td>no<td>n/a<td>all<td>specified value</table></div>
   2.371 +
   2.372 +

mercurial