csswg/css3-conditional Makefile,NONE,1.1 Overview.html,NONE,1.1 Overview.src.html,NONE,1.1

Update of /sources/public/csswg/css3-conditional
In directory hutz:/tmp/cvs-serv32215

Added Files:
	Makefile Overview.html Overview.src.html 
Log Message:
Add initial draft of css3-conditional, containing (1) allowing @-rules inside @media (2) @supports and (3) @document.

--- NEW FILE: Overview.html ---
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html lang=en>
 <head profile="http://www.w3.org/2006/03/hcard"><meta content="text/html;
  charset=utf-8" http-equiv=Content-Type>

  <title>CSS Conditional Rules Module Level 3</title>
  <link href="../default.css" rel=stylesheet type="text/css">
  <link href="http://www.w3.org/StyleSheets/TR/W3C-ED.css" rel=stylesheet
  type="text/css">

 <body>
  <div class=head> <!--begin-logo-->
   <p><a href="http://www.w3.org/"><img alt=W3C height=48
    src="http://www.w3.org/Icons/w3c_home" width=72></a> <!--end-logo-->

   <h1>CSS Conditional Rules Module Level 3</h1>

[...1012 lines suppressed...]
Local variables:
mode: sgml
sgml-declaration:"~/SGML/HTML4.decl"
sgml-default-doctype-name:"html"
sgml-minimize-attributes:t
sgml-nofill-elements:("pre" "style" "br")
sgml-live-element-indicator:t
sgml-omittag:nil
sgml-shorttag:nil
sgml-namecase-general:t
sgml-general-insert-case:lower
sgml-always-quote-attributes:t
sgml-indent-step:nil
sgml-indent-data:t
sgml-parent-document:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->

--- NEW FILE: Makefile ---
# Calling the post-processor with file-upload. Assumes the username
# and password are in ~/.curl-w3.org
#
# Possible other options:
# -F date=YYYY-MM-DD
# -F ids=on

%.html: %.src.html
	@echo "Calling post-processor to generate $@..."
	@curl -F file=@$< -F group=CSS -F output=html -F method=file -s -K ~/.curl-w3.org http://cgi.w3.org/member-bin/process.cgi >$@
%.err: %.src.html
	@echo "Calling post-processor to check $<..."
	@curl -F file=@$< -F group=CSS -F output=err -F method=file -s -K ~/.curl-w3.org http://cgi.w3.org/member-bin/process.cgi >$@



all: check Overview.html
	@echo Done.

check: Overview.err
	@cat $<
	@grep -q '^No errors$$' $< # Force a non-zero exit code if errors



# A handy shortcut:

commit: update clean all
	cvs commit -m 'Generated. Do not edit!' Overview.html

update:
	cvs update

clean:
	rm Overview.html



.PHONY: check commit update clean

--- NEW FILE: Overview.src.html ---
<!DOCTYPE html public '-//W3C//DTD HTML 4.01//EN'
  'http://www.w3.org/TR/html4/strict.dtd'>
<html lang="en">
<head profile="http://www.w3.org/2006/03/hcard">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>CSS Conditional Rules Module Level 3</title>
  <link rel="stylesheet" type="text/css" href="../default.css">
  <link rel="stylesheet" type="text/css"
        href="http://www.w3.org/StyleSheets/TR/W3C-[STATUS].css">
</head>

<div class="head">
<!--logo-->

<h1>CSS Conditional Rules Module Level 3</h1>

<h2 class="no-num no-toc">[LONGSTATUS] [DATE]</h2>
<dl>
  <dt>This version:
    <dd><a href="[VERSION]">
    http://www.w3.org/TR/[YEAR]/[STATUS]-[SHORTNAME]-[CDATE]</a>

  <dt>Latest version:
    <dd><a href="http://www.w3.org/TR/css3-conditional">http://www.w3.org/TR/css3-conditional</a>

  <dt>Previous version:
    <dd><a href="http://www.w3.org/TR/2011/REC-CSS2-2011MMDD/">http://www.w3.org/TR/2011/REC-CSS2-2011MMDD/</a> (<code>@media</code>)</dd>
    <dd><a href="http://lists.w3.org/Archives/Public/www-style/2011Apr/0428.html">http://lists.w3.org/Archives/Public/www-style/2011Apr/0428.html</a> (<code>@supports</code>)</dd>
    <dd><a href="http://lists.w3.org/Archives/Public/www-style/2004Aug/0135.html">http://lists.w3.org/Archives/Public/www-style/2004Aug/0135.html</a> (<code>@document</code>)</dd>

  <dt>Editors:
    <dd class=vcard><a class=fn href="http://dbaron.org/">L. David Baron</a>,
      <a class=org href="http://www.mozilla.org/">Mozilla</a>,
      <a class=email href="mailto:dbaron@dbaron.org">dbaron@dbaron.org</a>
</dl>

<!--copyright-->

<hr title="Separator for header">
</div>

<p class="issue">What should this specification be called?  CSS
Conditional Group(ing) Rules?  CSS Group(ing) Rules?  Something
else?</p>

<h2 class="no-num no-toc" id=abstract>Abstract</h2>

  <p>CSS is a language for describing the rendering of structured documents
  (such as HTML and XML) on screen, on paper,  in speech, etc. This module
  contains the features of CSS for conditional processing of parts of
  style sheets, conditioned on capabilities of the processor or the
  document the style sheet is being applied to.
  It includes and extends the functionality of CSS level&nbsp;2 [[!CSS21]],
  which builds on CSS level&nbsp;1 [[CSS1]].
  The main extensions compared to level&nbsp;2 are
  allowing nesting of certain at-rules inside <code>@media</code>,
  the addition of the <code>@supports</code> and <code>@document</code>
  rules for conditional processing.

<h2 class="no-num no-toc" id=status>Status of this document</h2>

<!--status-->

<p>The following features are at risk:
<ul>
  <li>The inclusion of <code>@font-face</code> rules and
  <code>@keyframes</code> rules as allowed within all of the @-rules in
  this specification is at risk, though only because of the relative
  rates of advancement of specifications.  If this specification is able
  to advance faster than one or both of the specifications defining
  those rules, then the inclusion of those rules will move from this
  specification to the specification defining those rules.</li>

  <li>The addition of support for @-rules inside of conditional grouping
  rules is at risk; if interoperable implementations are not found, it
  may be removed to advance the other features in this specification to
  Proposed Recommendation.</li>

  <li>The <code>@supports</code> rule is at risk; if interoperable
  implementations are not found, it may be removed to advance the other
  features in this specification to Proposed Recommendation.</li>

  <li>The <code>@document</code> rule is at risk; if interoperable
  implementations are not found, it may be removed to advance the other
  features in this specification to Proposed Recommendation.</li>

</ul>

<h2 class="no-num no-toc" id="contents">Table of contents</h2>

<!--toc-->

<h2>Introduction</h2>

<h3 id="context">Background</h3>

  <p><em>This section is not normative.</em>

  <p>[[!CSS21]] defines one type of conditional group rule, the
  <code>@media</code> rule, and allows only rulesets (not other @-rules)
  inside of it.  The <code>@media</code> rule provides the ability to
  have media-specific style sheets, which is also provided by style
  sheet linking features such as <code>@import</code> and
  <code>&lt;link&gt;</code>.  The restrictions on the contents of
  <code>@media</code> rules made them less useful; they forced authors
  using CSS features involving @-rules in media-specific style sheets to
  use separate style sheets for each medium.</p>

  <p>This specification extends the rules for the contents of
  conditional group rules to allow other @-rules, which enables authors
  to combine CSS features involving @-rules with media specific style
  sheets within a single style sheet.</p>

  <p>This specification also defines additional types of conditional
  group rules, <code>@supports</code> and <code>@document</code>, to
  address author and user requirements.</p>

  <p>The <code>@supports</code> rule allows CSS to be conditioned on
  implementation support for CSS properties and values.  This rule makes
  it much easier for authors to use new CSS features and provide good
  fallback for implementations that do not support those features.  This
  is particularly important for CSS features that provide new layout
  mechanisms, and for other cases where a set of related styles needs to
  be conditioned on property support.</p>

  <p>The <code>@document</code> rule allows CSS to be condition on the
  page to which the style sheet is being applied.  This allows users to
  apply styles to a particular page or group of pages, which greatly
  increases the power of user style sheets.</p>

<h3 id="placement">Module Interactions</h3>

  <p>This module replaces and extends the <code>@media</code> rule
  feature defined in [[!CSS21]] section <var>7.2.1</var> and
  incorporates the modifications previously made non-normatively by
  [[!MEDIAQ]] section <var>1</var>.</p>

  <p>Its current definition depends on @-rules defined in [[!CSS3FONT]]
  and [[!CSS3-ANIMATIONS]], but that dependency is only on the
  assumption that those modules will advance ahead of this one.  If this
  module advances faster, then the dependency will be reversed.</p>

<h3 id="conventions">Document Conventions</h3>

  <p>Conformance requirements are expressed with a combination of
  descriptive assertions and RFC 2119 terminology. The key words “MUST”,
  “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”,
  “RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this
  document are to be interpreted as described in RFC 2119.
  <!--However, for readability, these words do not appear in all uppercase
  letters in this specification.-->
  
  <p>All of the text of this specification is normative except sections
  explicitly marked as non-normative, examples, and notes. [[!RFC2119]]</p>
  
  <p>Examples in this specification are introduced with the words “for example”
  or are set apart from the normative text with <code>class="example"</code>,
  like this:
  
  <div class="example">
    <p>This is an example of an informative example.</p>
  </div>
  
  <p>Informative notes begin with the word “Note” and are set apart from the
  normative text with <code>class="note"</code>, like this:
  
  <p class="note">Note, this is an informative note.</p>

<h2 id="processing">Processing of conditional group rules</h2>

<p>This specification defines some CSS @-rules, called <dfn>conditional
group rules</dfn>, that associate a condition with a group of other
CSS rules.  These different rules allow testing different types of
conditions, but share common behavior for how their contents are used
when the condition is true and when the condition is false.</p>

<div class="example">
<p>For example, this rule:</p>
<pre>@media print {
  #navigation { display: none }
}</pre>
<p>causes a particular CSS rule (making elements with ID "navigation" be
display:none) apply only when the style sheet is used for a print
medium.  Likewise, this CSS rule:</p>
<pre>@document url("http://www.example.com/") {
  #example1 { display: none }
}</pre>
<p>does the same type of conditional application, but using a different
condition:  whether the style sheet is being applied to the page
<code>http://www.example.com/</code>.</p>
</div>

<p>Each conditional group rule has a condition, which at any time
evaluates to true or false.  When the condition is true, CSS processors
MUST apply the rules inside the group rule as though they were at the
group rule's location; when the condition is false, CSS processors MUST
not apply any of rules inside the group rule.  The current state of the
condition does not affect the CSS object model, in which the contents of
the group rule always remain within the group rule.</p>

<p>This means that when multiple conditional group rules are nested,
a rule inside of both of them applies only when all of the rules'
conditions are true.</p>

<div class="example">For example, with this set of nested rules:
<pre>@media print { // rule (1)
  #navigation { display: none }
  @media (max-width: 12cm) { // rule (2)
    .note { float: none }
  }
}</pre>
the condition of the rule marked (1) is true for print media, and the
condition of the rule marked (2) is true when the width of the display
area (which for print media is the page box) is less than or equal to
12cm.  Thus the rule <code>#navigation { display: none }</code> applies
whenever this style sheet is applied to print media, and the rule
<code>.note { float: none }</code> is applied only when the style sheet
is applied to print media <em>and</em> the width of the page box is less
than or equal to 12 centimeters.</div>

<p>When the condition for a conditional group rule changes,
CSS processors MUST reflect that the rules now apply or no longer apply,
except for properties whose definitions define effects of computed
values that persist past the lifetime of that value (such as for some
properties in [[CSS3-TRANSITIONS]] and [[!CSS3-ANIMATIONS]]).</p>

<h2 id="contents">Contents of conditional group rules</h2>

<p>The syntax of each conditional group rule consists of some syntax
specific to the type of rule followed by a <dfn>group rule body</dfn>,
which is a block (pair of braces) containing a sequence of rules.</p>

<p>A group rule body is allowed to contain rulesets and any @-rules that
are allowed at the top level of a style sheet before and after a
ruleset.  This means that @-rules that must occur at the beginning of
the style sheet, such as <code>@charset</code>, <code>@import</code>,
and <code>@namespace</code> are not allowed inside of conditional group
rules.  Conditional group rules can be nested.</p>

<p>In terms of the grammar, this specification defines the following
productions for use in the grammar of conditional group rules:</p>

<pre>nested_statement
  : ruleset | media | page | font_face_rule | keyframes-rule |
    supports_rule | document_rule
  ;

group_rule_body
  : '{' S* nested_statement* '}' S*
  ;</pre>
in which all the productions are defined in that grammar with the
exception of <code>font_face_rule</code> <span class="issue">not</span>
defined in [[!CSS3FONT]], <code>keyframes-rule</code> <span
class="issue">shouldn't have dash?</span> defined in
[[!CSS3-ANIMATIONS]], and <code>media</code>, <code>supports_rule</code>
and <code>document_rule</code> defined in this specification.</p>

<p>In general, future CSS specifications that add new @-rules that are
not forbidden to occur after some other types of rules should modify
this <code>nested_statement</code> production to keep the grammar
accurate.</p>

<p>Style sheets MUST NOT use rules other than the allowed ones inside
conditional group rules.</p>

<h3 id="group-error">Error handling</h3>

<p>Implementations MUST ignore rules that are not allowed within a group
rule.</p>

<p class="issue">Define error handling rules for unknown things.</p>

<h2 id="at-media">Media-specific style sheets:  the <code>@media</code> rule</h2>

<p>The <dfn><code>@media</code> rule</dfn> is a conditional group rule whose
condition is a media query.  It consists of the at-keyword
<code>@media</code> followed by a (possibly empty) media query (as
defined in [[!MEDIAQ]]), followed by a group rule body.  The condition
of the rule is the result of the media query.</p>

<div class="example">
<p>This <code>@media</code> rule:</p>
<pre>@media print, (max-width: 600px) {
  #extra_navigation { display: none }
}</pre>
<p>has the condition <code>print, (max-width: 600px)</code>, which is
true for print media and for devices whose width is at most 600px.  When
either of this is true, the condition of the rule is true, and the rule
<code>#extra_navigation { display: none }</code> is applied.
</div>

<p>In terms of the grammar, this specification extends the
<code>media</code> production in the
<a href="http://www.w3.org/TR/CSS21/grammar.html">Grammar of CSS 2.1</a>
([[!CSS21]], Appendix G) into:
<pre>media
  : MEDIA_SYM S+ media_query_list group_rule_body
  ;</pre>
<p>where the <code>group_rule_body</code> production is defined in this
specification, the <code>media_query_list</code> production is defined
in [[!MEDIAQ]], and the others are defined in the <a
href="http://www.w3.org/TR/CSS21/grammar.html">Grammar of CSS 2.1</a>
([[!CSS21]], Appendix G).

<p class="issue">This changes the <code>S*</code> in CSS 2.1 into
<code>S+</code>.  Is that correct?</p>

<h2 id="at-supports">Feature queries: the <code>@supports</code> rule</h2>

<p>The <dfn><code>@supports</code> rule</dfn> is a conditional group
rule whose condition tests whether the user agent supports CSS
property:value pairs.  Authors can use it to write style sheets that use
new features when available but degrade gracefully when those features
are not supported.  CSS has existing mechanisms for graceful
degradation, such as ignoring unsupported properties or values, but
these are not always sufficient when large groups of styles need to be
tied to the support for certain features, as is the case for use of new
layout system features.</p>

<p>The syntax of the condition in the <code>@supports</code> rule is
slightly more complicated than for the other conditional group rules
(though has some similarities to media queries) since:</p>
<ul>
  <li>negation is needed so that the new-feature styles and the fallback
  styles can be separated (within the forward-compatible grammar's rules
  for the syntax of @-rules), and not required to override each other</li>
  <li>conjunction (and) is needed so that multiple required features can
  be tested</li>
  <li>disjunction (or) is needed when there are multiple alternative
  features for a set of styles, particularly when some of those
  alternatives are vendor-prefixed properties or values</li>
</ul>

<p>Therefore, the syntax of the <code>@supports</code> rule allows
testing for property:value pairs, and arbitrary conjunctions (and),
disjunctions (or), and negations (not) of them.</p>

<p>This extends the lexical scanner in the
<a href="http://www.w3.org/TR/CSS21/grammar.html">Grammar of CSS 2.1</a>
([[!CSS21]], Appendix G) by adding:
<pre>@{S}{U}{P}{P}{O}{R}{T}{S}	{return SUPPORTS_SYM;}</pre>
<p>and the grammar by adding</p>
<pre>supports_rule
  : SUPPORTS_SYM S+ supports_condition group_rule_body
  ;

supports_condition
  : supports_negation | supports_conjunction | supports_disjunction |
    supports_declaration_condition
  ;

supports_negation
  : 'not' S* supports_condition_in_parens
  ;

supports_conjunction
  : supports_condition_in_parens ( 'and' S* supports_condition_in_parens )+
  ;

supports_disjunction
  : supports_condition_in_parens ( 'or' S* supports_condition_in_parens )+
  ;

supports_condition_in_parens
  : ( '(' supports_condition ')' S* ) | supports_declaration_condition
  ;

supports_declaration_condition
  : '(' S* declaration ')' S*
  ;</pre>

<p>The rules for evaluating the condition in each of the above grammar
terms are:</p>
<dl>
<dt>supports_condition</dt>
<dd>
  evaluate the single child term
</dd>

<dt>supports_negation</dt>
<dd>
  negate the result of evaluating the single child term
</dd>

<dt>supports_conjunction</dt>
<dd>
  true if all of the (non-'and') child terms are true, otherwise false
</dd>

<dt>supports_disjunction</dt>
<dd>
  true if any of the (non-'or') child terms are true, otherwise false
</dd>

<dt>supports_condition_in_parens</dt>
<dd>
  evaluate the single (non-'(' and non-')') child term
</dd>

<dt>supports_declaration_condition</dt>
<dd>
  true if the user agent supports the declaration (which is the same
  as the rule for whether the user agent parses the declaration),
  otherwise false
  <span class="issue">Need more normative prose here; probably some in the
  snapshot which we (unfortunately) need to copy rather than cite.</span>
</dd>
</dl>

<p>and the condition of the <code>@supports</code> rule is the
condition thus described for the <code>supports_rule</code> term.</p>

<p class="issue">Describe these examples.</p>

<pre class="example">@supports ( display: flex ) {
  ...
}</pre>

<pre class="example">@supports ( -moz-box-shadow: 2px 2px 2px black ) or
          ( -webkit-box-shadow: 2px 2px 2px black ) or
          ( -o-box-shadow: 2px 2px 2px black ) {
  ...
}</pre>

<pre class="example">@supports not ( display: flex ) {
  ...
}</pre>

<p>To avoid confusion between and and or, the syntax requires that both
and and or be specified explicitly (rather than, say, using commas or
spaces for one of them).  Likewise, to avoid confusion caused by
precedence rules, the syntax does not allow and, or, and not operators
to be mixed without a layer of parentheses.  <span class="issue">Add
examples.</span></p>


<h2 id="at-document">Document queries: the <code>@document</code> rule</h2>

<p>The <dfn><code>@document</code> rule</dfn> is a conditional group
rule whose condition depends on the URL of the document being styled.
This allows style sheets, particularly user style sheets, to have styles
that only apply to a set of pages rather than to all pages using the
style sheet.</p>

<p class="issue">Given that this @-rule is intended primarily for user
style sheets, what should this specification say about its use in author
style sheets?  Should it be forbidden?  Should use instead be
discouraged?  Or should this specification remain neutral on the
topic?</p>

<p>The <code>@document</code> rule's condition is written as a
comma-separated list of <dfn>URL matching functions</dfn>, and the
condition evaluates to true whenever any one of those functions
evaluates to true.  The following URL matching functions are
permitted:</p>

<dl>
  <dt>&lt;url&gt;</dt>

  <dd>
    <p>The <code>url()</code> function is the <dfn>exact url matching
    function</dfn>.  It evaluates to true whenever the URL of the
    document being styled is exactly the URL given.</p>

    <p class="Note">The url() function, since it is a core syntax
    element in CSS, is allowed (subject to different character
    limitations and thus escaping requirements) to contain an unquoted
    value (in addition to the string values that are allowed as
    arguments for all four functions).</p>

    <div class="example">
      <p>For example, this rule:</p>
<pre>@document url("http://www.w3.org/Style/CSS/") {
  #summary { background: yellow; color: black}
}</pre>
      <p>styles the <code>summary</code> element on the page
      <code>http://www.w3.org/Style/CSS/</code>, but not on any other
      pages.</p>
    </div>
  </dd>

  <dt>url-prefix(&lt;string&gt;)</dt>

  <dd>
    <p>The <code>url-prefix()</code> function is the <dfn>url prefix
    matching function</dfn>.  It evaluates to true whenever the URL of
    the document being styled has the argument to the function as an
    initial substring (which is true when the two strings are equal).
    When the argument is the empty string, it evaluates to true for all
    documents.</p>
    <div class="example">
      <p>For example, this rule:</p>
<pre>@document url-prefix("http://www.w3.org/Style/CSS/") {
  #summary { background: yellow; color: black}
}</pre>
      <p>styles the <code>summary</code> element on the page
      <code>http://www.w3.org/Style/CSS/</code> and on the page
      <code>http://www.w3.org/Style/CSS/Test</code>, but it does not
      affect the page <code>http://www.w3.org/</code> or the page
      <code>http://www.example.com/Style/CSS/</code>.</p>
    </div>
  </dd>

  <dt>domain(&lt;string&gt;)</dt>

  <dd>
    <p>The <code>domain()</code> function is the <dfn>domain
    matching function</dfn>.  It evaluates to true whenever
    the URL of the page has a host subcomponent (as defined in [[!URI]])
    and that host subcomponent is exactly the argument to the
    <code>domain()</code> function or a final substring of the host
    component is a period (U+002E) immediately followed by the argument
    to the <code>domain()</code> function.</p>
    <div class="example">
      <p>For example, this rule:</p>
<pre>@document domain("w3.org") {
  body { font-size: 16px ! important }
}</pre>
      <p>changes the font size of the body element for pages such as
      <code>http://www.w3.org/Style/CSS/</code> and
      <code>http://w3.org/Style/CSS/</code> and
      <code>http://lists.w3.org/Archives/Public/www-style/</code>
      but it does not affect the page
      <code>http://www.example.com/Style/CSS/</code>.</p>
    </div>
  </dd>

  <dt>regexp(&lt;string&gt;)</dt>

  <dd>
    <p class="issue">Write me</p>

    <p class="note">This definition intentionally matches the behavior
    of the <a
    href="http://dev.w3.org/html5/spec/common-input-element-attributes.html#attr-input-pattern"><code>pattern</code>
    attribute</a> on the <code>input</code> element in [[HTML5]].</p>
  </dd>

</dl>

<p class="issue">What form of normalization is done on URLs and domains
before matching?</p>

<p class="issue">Need to define what URL we care about, perhaps in terms
of browsing context.  It should apply to the URL of an
iframe/object/embed/img; it should probably not apply to the URL of an
svg:use.</p>

<p>Implementations MUST treat any unknown URL matching functions as a
syntax error, and thus ignore the <code>@document</code> rule.  <span
class="issue">Should we instead have more complicated error handling
rules?</span></p>

<p>This extends the lexical scanner in the
<a href="http://www.w3.org/TR/CSS21/grammar.html">Grammar of CSS 2.1</a>
([[!CSS21]], Appendix G) by adding:
<pre>@{D}{O}{C}{U}{M}{E}{N}{T}	{return DOCUMENT_SYM;}</pre>
<p>and the grammar by adding</p>
<pre>document_rule
  : DOCUMENT_SYM S+ url_match_fn ( "," S* url_match_fn )* group_rule_body
  ;

url_match_fn
  : URI | FUNCTION
  ;</pre>

<h2 id="conformance">Conformance</h2>

<h3 id="conformance-classes">Conformance Classes</h3>

  <p>Conformance to the CSS Conditional Rules Module is defined for three
  conformance classes:
  <dl>
    <dt><dfn title="style sheet!!as conformance class">style sheet</dfn>
      <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS
      style sheet</a>.
    <dt><dfn>renderer</dfn></dt>
      <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
      that interprets the semantics of a style sheet and renders
      documents that use them.
    <dt><dfn id="authoring-tool">authoring tool</dfn></dt>
      <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
      that writes a style sheet.
  </dl>
  
  <p>A style sheet is conformant to <var class="issue">CSS TEMPLATE Module</var>
  if all of its declarations that use properties defined in this module
  have values that are valid according to the generic CSS grammar and the
  individual grammars of each property as given in this module.
  
  <p>A renderer is conformant to <var class="issue">CSS TEMPLATE Module</var>
  if, in addition to interpreting the style sheet as defined by the
  appropriate specifications, it supports all the properties defined
  by <var class="issue">CSS TEMPLATE Module</var> by parsing them correctly
  and rendering the document accordingly. However, the inability of a
  UA to correctly render a document due to limitations of the device
  does not make the UA non-conformant. (For example, a UA is not
  required to render color on a monochrome monitor.)
  
  <p>An authoring tool is conformant to <var class="issue">CSS TEMPLATE Module</var>
  if it writes syntactically correct style sheets, according to the
  generic CSS grammar and the individual grammars of each property in
  this module.

<h3 id="partial">
Partial Implementations</h3>

  <p>So that authors can exploit the forward-compatible parsing rules to
  assign fallback values, CSS renderers <strong>must</strong>
  treat as invalid (and <a href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignore
  as appropriate</a>) any at-rules, properties, property values, keywords,
  and other syntactic constructs for which they have no usable level of
  support. In particular, user agents <strong>must not</strong> selectively
  ignore unsupported component values and honor supported values in a single
  multi-value property declaration: if any value is considered invalid
  (as unsupported values must be), CSS requires that the entire declaration
  be ignored.</p>

<h3 id="experimental">Experimental Implementations</h3>

  <p>To avoid clashes with future CSS features, the CSS specifications
  reserve a <a href="http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords">prefixed
  syntax</a> for proprietary property and value extensions to CSS. The CSS
  Working Group recommends that experimental implementations of features in
  CSS Working Drafts also use vendor-prefixed property or value names. This
  avoids any incompatibilities with future changes in the draft. Once a
  specification reaches the Candidate Recommendation stage, implementors
  should implement the non-prefixed syntax for any feature they consider to
  be correctly implemented according to spec.</p>

<h3 id="cr-exit-criteria">CR Exit Criteria</h3>

  <p id=cr-exit-criteria>
  For this specification to be advanced to Proposed Recommendation,
  there must be at least two independent, interoperable implementations
  of each feature. Each feature may be implemented by a different set of
  products, there is no requirement that all features be implemented by
  a single product. For the purposes of this criterion, we define the
  following terms:
  
  <dl>
    <dt>independent <dd>each implementation must be developed by a
    different party and cannot share, reuse, or derive from code
    used by another qualifying implementation. Sections of code that
    have no bearing on the implementation of this specification are
    exempt from this requirement.
  
    <dt>interoperable <dd>passing the respective test case(s) in the
    official CSS test suite, or, if the implementation is not a Web
    browser, an equivalent test. Every relevant test in the test
    suite should have an equivalent test created if such a user
    agent (UA) is to be used to claim interoperability. In addition
    if such a UA is to be used to claim interoperability, then there
    must one or more additional UAs which can also pass those
    equivalent tests in the same way for the purpose of
    interoperability. The equivalent tests must be made publicly
    available for the purposes of peer review.
  
    <dt>implementation <dd>a user agent which:
  
    <ol class=inline>
      <li>implements the specification.
  
      <li>is available to the general public. The implementation may
      be a shipping product or other publicly available version
      (i.e., beta version, preview release, or “nightly build”). 
      Non-shipping product releases must have implemented the
      feature(s) for a period of at least one month in order to
      demonstrate stability.
  
      <li>is not experimental (i.e., a version specifically designed
      to pass the test suite and is not intended for normal usage
      going forward).
    </ol>
  </dl>
  
  <p>The specification will remain Candidate Recommendation for at least
  six months.

<h2 class=no-num id=grammar>Grammar</h2>

<p>In order to allow these new @-rules in CSS style sheets, this
specification modifies the <code>stylesheet</code> production in the <a
href="http://www.w3.org/TR/CSS21/grammar.html">Appendix G</a> grammar of
[[!CSS21]] by replacing the <code>media</code> production defined in
[[!CSS21]] with the <code>media</code> production defined in this one,
and additionally inserting <code>| supports_rule | document_rule</code>
alongside <code>ruleset | media | page</code>.</p>

<h2 class=no-num id=acknowledgments>Acknowledgments</h2>

<p>
Thanks to the ideas and feedback from
<span lang="tr">Tantek Çelik</span>,
Elika Etemad,
Pascal Germroth,
<span lang="de">Björn Höhrmann</span>,
Chris Moschini,
Ben Ward,
Zack Weinberg,
Boris Zbarsky,
and all the rest of the <a href="http://lists.w3.org/Archives/Public/www-style/">www-style</a> community.

</p>

<h2 class=no-num id=references>References</h2>


<h3 class="no-num" id="normative-references">Normative references</h3>
<!--normative-->

<h3 class="no-num" id="other-references">Other references</h3>
<!--informative-->

<h2 class="no-num" id="index">Index</h2>
<!--index-->

</body>
</html>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-declaration:"~/SGML/HTML4.decl"
sgml-default-doctype-name:"html"
sgml-minimize-attributes:t
sgml-nofill-elements:("pre" "style" "br")
sgml-live-element-indicator:t
sgml-omittag:nil
sgml-shorttag:nil
sgml-namecase-general:t
sgml-general-insert-case:lower
sgml-always-quote-attributes:t
sgml-indent-step:nil
sgml-indent-data:t
sgml-parent-document:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->
 

Received on Saturday, 4 June 2011 06:55:04 UTC