Wed, 09 Dec 2009 20:18:06 +0000
Rip out extra features
css-style-attr/Overview.html | file | annotate | diff | comparison | revisions | |
css-style-attr/Overview.src.html | file | annotate | diff | comparison | revisions |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/css-style-attr/Overview.html Wed Dec 09 20:18:06 2009 +0000 1.3 @@ -0,0 +1,249 @@ 1.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> 1.5 + 1.6 +<html lang=en> 1.7 + <head><meta content="text/html; charset=utf-8" http-equiv=Content-Type> 1.8 + 1.9 + <title>CSS Style Attribute Syntax Level 1</title> 1.10 + <link href="../default.css" rel=stylesheet type="text/css"> 1.11 + <link href="http://www.w3.org/StyleSheets/TR/W3C-ED" rel=stylesheet 1.12 + type="text/css"> 1.13 + 1.14 + <body> 1.15 + <div class=head> <!--begin-logo--> 1.16 + <p><a href="http://www.w3.org/"><img alt=W3C height=48 1.17 + src="http://www.w3.org/Icons/w3c_home" width=72></a> <!--end-logo--> 1.18 + 1.19 + <h1>CSS Namespaces Module</h1> 1.20 + 1.21 + <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 9 December 1.22 + 2009</h2> 1.23 + 1.24 + <dl> 1.25 + <dt>This version:</dt> 1.26 + <!-- <dd><dd><a href="http://www.w3.org/TR/2009/WD-css-style-attr-20091209/">http://www.w3.org/TR/2009/WD-css-style-attr-20091209/</a></dd> --> 1.27 + 1.28 + <dd><a 1.29 + href="http://dev.w3.org/csswg/css-style-attr/">http://dev.w3.org/csswg/css-style-attr/</a> 1.30 + 1.31 + 1.32 + <dt>Latest version: 1.33 + 1.34 + <dd><a 1.35 + href="http://www.w3.org/TR/css-style-attr">http://www.w3.org/TR/css-style-attr</a> 1.36 + 1.37 + 1.38 + <dt>Previous version: 1.39 + 1.40 + <dd><a 1.41 + href="http://www.w3.org/TR/2002/WD-css-style-attr-20020515">http://www.w3.org/TR/2002/WD-css-style-attr-20020515</a> 1.42 + 1.43 + 1.44 + <dt>Editor: 1.45 + 1.46 + <dd><a href="http://fantasai.inkedblade.net/contact/">Elika J. Etemad</a> 1.47 + 1.48 + 1.49 + <dt>Previous Editors: 1.50 + 1.51 + <dd><span lang=tr>Tantek Çelik</span> (<a 1.52 + href="http://www.microsoft.com/">Microsoft</a>), <<a 1.53 + href="mailto:tantekc@microsoft.com">tantekc@microsoft.com</a>> 1.54 + 1.55 + <dd><a href="http://www.w3.org/People/Bos/">Bert Bos</a> (<a 1.56 + href="http://www.w3.org/">W3C</a>), <<a 1.57 + href="mailto:bert@w3.org">bert@w3.org</a>> 1.58 + 1.59 + <dd>Marc Attinasi (AOL/Netscape), <<a 1.60 + href="mailto:attinasi@netscape.com">attinasi@netscape.com</a>> 1.61 + </dl> 1.62 + <!--begin-copyright--> 1.63 + <p class=copyright><a 1.64 + href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright" 1.65 + rel=license>Copyright</a> © 2009 <a 1.66 + href="http://www.w3.org/"><acronym title="World Wide Web 1.67 + Consortium">W3C</acronym></a><sup>®</sup> (<a 1.68 + href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute 1.69 + of Technology">MIT</acronym></a>, <a 1.70 + href="http://www.ercim.org/"><acronym title="European Research Consortium 1.71 + for Informatics and Mathematics">ERCIM</acronym></a>, <a 1.72 + href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a 1.73 + href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, 1.74 + <a 1.75 + href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> 1.76 + and <a 1.77 + href="http://www.w3.org/Consortium/Legal/copyright-documents">document 1.78 + use</a> rules apply.</p> 1.79 + <!--end-copyright--> 1.80 + <hr title="Separator for header"> 1.81 + </div> 1.82 + 1.83 + <h2 class="no-num no-toc" id=abstract>Abstract</h2> 1.84 + 1.85 + <p>Markup languages such as HTML and SVG provide a "style" attribute on 1.86 + most elements, to hold a fragment of a style sheet that applies to those 1.87 + elements. One of the possible style sheet languages is CSS. This draft 1.88 + describes the syntax of the CSS fragment that can be used in the "style" 1.89 + attribute. 1.90 + 1.91 + <h2 class="no-num no-toc" id=status>Status of this document</h2> 1.92 + <!--begin-status--> 1.93 + 1.94 + <p>This is a public copy of the editors' draft. It is provided for 1.95 + discussion only and may change at any moment. Its publication here does 1.96 + not imply endorsement of its contents by W3C. Don't cite this document 1.97 + other than as work in progress. 1.98 + 1.99 + <p>The (<a 1.100 + href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) public 1.101 + mailing list <a 1.102 + href="mailto:www-style@w3.org?Subject=%5Bcss-style-attr%5D%20PUT%20SUBJECT%20HERE"> 1.103 + www-style@w3.org</a> (see <a 1.104 + href="http://www.w3.org/Mail/Request">instructions</a>) is preferred for 1.105 + discussion of this specification. When sending e-mail, please put the text 1.106 + “css-style-attr” in the subject, preferably like this: 1.107 + “[<!---->css-style-attr<!---->] <em>…summary of 1.108 + comment…</em>” 1.109 + 1.110 + <p>This document was produced by the <a href="/Style/CSS/members">CSS 1.111 + Working Group</a> (part of the <a href="/Style/">Style Activity</a>). 1.112 + 1.113 + <p>This document was produced by a group operating under the <a 1.114 + href="/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent 1.115 + Policy</a>. W3C maintains a <a href="/2004/01/pp-impl/32061/status" 1.116 + rel=disclosure>public list of any patent disclosures</a> made in 1.117 + connection with the deliverables of the group; that page also includes 1.118 + instructions for disclosing a patent. An individual who has actual 1.119 + knowledge of a patent which the individual believes contains <a 1.120 + href="/Consortium/Patent-Policy-20040205/#def-essential">Essential 1.121 + Claim(s)</a> must disclose the information in accordance with <a 1.122 + href="/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the 1.123 + W3C Patent Policy</a>.</p> 1.124 + <!--end-status--> 1.125 + 1.126 + <h2 class="no-num no-toc" id=contents>Table of contents</h2> 1.127 + <!--begin-toc--> 1.128 + 1.129 + <ul class=toc> 1.130 + <li><a href="#intro"><span class=secno>1. </span>Introduction</a> 1.131 + 1.132 + <li><a href="#syntax"><span class=secno>2. </span>Syntax</a> 1.133 + 1.134 + <li><a href="#grammar"><span class=secno>3. </span>Grammar</a> 1.135 + 1.136 + <li><a href="#cascading"><span class=secno>4. </span>Cascading order</a> 1.137 + 1.138 + <li><a href="#ack"><span class=secno>5. </span>Acknowledgments</a> 1.139 + 1.140 + <li><a href="#references"><span class=secno>6. </span>References </a> 1.141 + <ul class=toc> 1.142 + <li class=no-num><a href="#normative-references">Normative 1.143 + references</a> 1.144 + 1.145 + <li class=no-num><a href="#informative-references">Informative 1.146 + references</a> 1.147 + </ul> 1.148 + </ul> 1.149 + <!--end-toc--> 1.150 + 1.151 + <h2 id=intro><span class=secno>1. </span>Introduction</h2> 1.152 + 1.153 + <p>Several XML-based document formats have a "style" attribute to permit 1.154 + the author to directly apply style information to specific elements in 1.155 + documents. If a document format defines a "style" attribute and the 1.156 + attribute accepts CSS as its value, then this specification describes the 1.157 + attribute's syntax and interpretation. 1.158 + 1.159 + <div class=example> 1.160 + <p>The following example shows the use of the <code>style</code> attribute 1.161 + in HTML:</p> 1.162 + 1.163 + <pre><p style="<em>color: #090; line-height: 1.2</em>">...</p></pre> 1.164 + </div> 1.165 + 1.166 + <h2 id=syntax><span class=secno>2. </span>Syntax</h2> 1.167 + 1.168 + <p>The syntax of the style attribute syntax is exactly the same as the 1.169 + contents of a CSS <a 1.170 + href="http://www.w3.org/TR/CSS21/syndata.html#rule-sets">declaration 1.171 + block</a>. A close brace (<code>}</code>) in the style attribute value 1.172 + does not terminate the style data; it is merely an invalid token. 1.173 + 1.174 + <p>The same rules for forward-compatible parsing apply to the inline style 1.175 + sheet as to a normal style sheet. See <a 1.176 + href="/TR/CSS21/syndata.html">chapter 4 of the CSS2.1 specification</a>. 1.177 + <a href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> 1.178 + 1.179 + <h2 id=grammar><span class=secno>3. </span>Grammar</h2> 1.180 + 1.181 + <p>The syntax of the CSS fragment that is allowed in the HTML "style" 1.182 + attribute can be formally specified as follows: 1.183 + 1.184 + <pre> 1.185 +inline-stylesheet 1.186 + : S* declaration-block 1.187 + ; 1.188 + 1.189 +declaration-block 1.190 + : declaration [ ';' S* declaration ]* 1.191 + ; 1.192 +</pre> 1.193 + 1.194 + <p>Please refer to the grammar in <a href="/TR/CSS21/grammar.html">appendix 1.195 + D of the CSS2.1 specification</a> <a href="#CSS21" 1.196 + rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> for the definition of the 1.197 + symbols not defined here. 1.198 + 1.199 + <h2 id=cascading><span class=secno>4. </span>Cascading order</h2> 1.200 + 1.201 + <p>The declarations in a style attribute apply to the element to which the 1.202 + attribute belongs. CSS2.1 <a 1.203 + href="/TR/CSS21/cascade.html#specificity">defines</a> how style sheets and 1.204 + "style" attributes are cascaded together. <a href="#CSS21" 1.205 + rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> 1.206 + 1.207 + <h2 id=ack><span class=secno>5. </span>Acknowledgments</h2> 1.208 + 1.209 + <p>Thanks to feedback from Daniel Glazman, Ian Hickson, Eric A. Meyer, 1.210 + Björn Höhrmann. 1.211 + 1.212 + <h2 id=references><span class=secno>6. </span>References</h2> 1.213 + 1.214 + <h3 class=no-num id=normative-references>Normative references</h3> 1.215 + <!--begin-normative--> 1.216 + <!-- Sorted by label --> 1.217 + 1.218 + <dl class=bibliography> 1.219 + <dt style="display: none"><!-- keeps the doc valid if the DL is empty --> 1.220 + <!----> 1.221 + 1.222 + <dt id=CSS21>[CSS21] 1.223 + 1.224 + <dd>Bert Bos; et al. <a 1.225 + href="http://www.w3.org/TR/2009/CR-CSS2-20090908"><cite>Cascading Style 1.226 + Sheets Level 2 Revision 1 (CSS 2.1) Specification.</cite></a> 8 September 1.227 + 2009. W3C Candidate Recommendation. (Work in progress.) URL: <a 1.228 + href="http://www.w3.org/TR/2009/CR-CSS2-20090908">http://www.w3.org/TR/2009/CR-CSS2-20090908</a> 1.229 + </dd> 1.230 + <!----> 1.231 + </dl> 1.232 + <!--end-normative--> 1.233 + 1.234 + <h3 class=no-num id=informative-references>Informative references</h3> 1.235 + <!--begin-informative--> 1.236 + <!-- Sorted by label --> 1.237 + 1.238 + <dl class=bibliography> 1.239 + <dt style="display: none"><!-- keeps the doc valid if the DL is empty --> 1.240 + <!----> 1.241 + </dl> 1.242 + <!--end-informative--> 1.243 +</html> 1.244 +<!-- Keep this comment at the end of the file 1.245 +Local variables: 1.246 +mode: sgml 1.247 +sgml-declaration:"~/SGML/HTML4.decl" 1.248 +sgml-default-doctype-name:"html" 1.249 +sgml-minimize-attributes:t 1.250 +sgml-nofill-elements:("pre" "style" "br") 1.251 +End: 1.252 +-->
2.1 --- a/css-style-attr/Overview.src.html Wed Dec 09 20:13:33 2009 +0000 2.2 +++ b/css-style-attr/Overview.src.html Wed Dec 09 20:18:06 2009 +0000 2.3 @@ -1,476 +1,124 @@ 2.4 -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" 2.5 -"http://www.w3.org/TR/html4/strict.dtd"> 2.6 +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> 2.7 +<html lang="en"> 2.8 +<head> 2.9 + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 2.10 + <title>CSS Style Attribute Syntax Level 1</title> 2.11 + <link rel="stylesheet" type="text/css" href="../default.css"> 2.12 2.13 -<html> 2.14 -<head> 2.15 -<title>Syntax of CSS rules in HTML's "style" attribute</title> 2.16 - 2.17 -<style type="text/css"> 2.18 - .emph-code {text-decoration: underline} 2.19 - table.tprofile th.title { background: gray; color: white } 2.20 - table.tprofile th { width:29% } 2.21 - table.tprofile td { width:71% } 2.22 - table.tprofile td ul { margin:0; list-style:none } 2.23 -</style> 2.24 - 2.25 -<link href="http://www.w3.org/StyleSheets/TR/W3C-WD.css" rel="stylesheet" type="text/css"> 2.26 + <link rel="stylesheet" type="text/css" href="http://www.w3.org/StyleSheets/TR/W3C-ED"> 2.27 </head> 2.28 2.29 -<body> 2.30 -<div class="head"> 2.31 -<p><a href="http://www.w3.org/"><img alt="W3C" height="48" 2.32 -src="http://www.w3.org/Icons/w3c_home" width="72"></a> 2.33 +<div class="head"> 2.34 +<!--logo--> 2.35 2.36 -<h1 id="syntax">Syntax of CSS rules in HTML's "style" attribute</h1> 2.37 +<h1>CSS Namespaces Module</h1> 2.38 2.39 -<h2 class="no-num no-toc" id="w3c-working">W3C Working Draft 15 May 2002</h2> 2.40 +<h2 class="no-num no-toc">[LONGSTATUS] [DATE]</h2> 2.41 +<dl> 2.42 + <dt>This version:</dt> 2.43 + <!-- <dd><dd><a href="http://www.w3.org/TR/[YEAR]/WD-css-style-attr-[CDATE]/">http://www.w3.org/TR/[YEAR]/WD-css-style-attr-[CDATE]/</a></dd> --> 2.44 + <dd><a href="http://dev.w3.org/csswg/css-style-attr/">http://dev.w3.org/csswg/css-style-attr/</a> 2.45 + <dt>Latest version: 2.46 + <dd><a href="http://www.w3.org/TR/css-style-attr">http://www.w3.org/TR/css-style-attr</a> 2.47 + <dt>Previous version: 2.48 + <dd><a href="http://www.w3.org/TR/2002/WD-css-style-attr-20020515">http://www.w3.org/TR/2002/WD-css-style-attr-20020515</a> 2.49 + <dt>Editor: 2.50 + <dd><a href="http://fantasai.inkedblade.net/contact/">Elika J. Etemad</a> 2.51 + <dt>Previous Editors: 2.52 + <dd><span lang="tr">Tantek Çelik</span> (<a href="http://www.microsoft.com/">Microsoft</a>), <<a href="mailto:tantekc@microsoft.com">tantekc@microsoft.com</a>> 2.53 + <dd><a href="http://www.w3.org/People/Bos/">Bert Bos</a> (<a href="http://www.w3.org/">W3C</a>), <<a href="mailto:bert@w3.org">bert@w3.org</a>> 2.54 + <dd>Marc Attinasi (AOL/Netscape), <<a href="mailto:attinasi@netscape.com">attinasi@netscape.com</a>> 2.55 +</dl> 2.56 +<!--begin-copyright--> 2.57 +<p>[Here will be included the file "../copyright.inc"]</p> 2.58 +<!--end-copyright--> 2.59 2.60 -<dl> 2.61 -<dt>This version: 2.62 - 2.63 -<dd><a 2.64 -href="http://www.w3.org/TR/2002/WD-css-style-attr-20020515">http://www.w3.org/TR/2002/WD-css-style-attr-20020515</a> 2.65 - 2.66 -<dt>Latest version: 2.67 - 2.68 -<dd><a 2.69 -href="http://www.w3.org/TR/css-style-attr">http://www.w3.org/TR/css-style-attr</a> 2.70 - 2.71 -<dt>Previous version: 2.72 - 2.73 -<dd><a 2.74 -href="http://www.w3.org/TR/2001/WD-css-style-attr-20010305">http://www.w3.org/TR/2001/WD-css-style-attr-20010305</a> 2.75 - 2.76 -<dt>Editors: 2.77 - 2.78 -<dd><span lang="tr">Tantek Çelik</span> 2.79 -(<a href="http://www.microsoft.com/">Microsoft</a>), 2.80 -<<a href="mailto:tantekc@microsoft.com">tantekc@microsoft.com</a>> 2.81 - 2.82 -<dd><a href="http://www.w3.org/People/Bos/">Bert Bos</a> 2.83 -(<a href="http://www.w3.org/">W3C</a>), 2.84 -<<a href="mailto:bert@w3.org">bert@w3.org</a>> 2.85 - 2.86 -<dd>Marc Attinasi (AOL/Netscape), 2.87 -<<a href="mailto:attinasi@netscape.com">attinasi@netscape.com</a>> 2.88 -</dl> 2.89 -<!--begin-include "../css3-src/copyright.inc"--> 2.90 -<p class="copyright"><a 2.91 -href="http://www.w3.org/Consortium/Legal/ipr-notice-20000612#Copyright"> 2.92 -Copyright</a> ©2002 <a href="http://www.w3.org/"><abbr title="World Wide 2.93 -Web Consortium">W3C</abbr></a><sup>®</sup> (<a 2.94 -href="http://www.lcs.mit.edu/"><abbr title="Massachusetts Institute of 2.95 -Technology">MIT</abbr></a>, <a href="http://www.inria.fr/"><abbr lang="fr" 2.96 -title="Institut National de Recherche en Informatique et 2.97 -Automatique">INRIA</abbr></a>, <a href="http://www.keio.ac.jp/">Keio</a>), 2.98 -All Rights Reserved. W3C <a 2.99 -href="http://www.w3.org/Consortium/Legal/ipr-notice-20000612#Legal_Disclaimer">liability</a>, 2.100 -<a 2.101 -href="http://www.w3.org/Consortium/Legal/ipr-notice-20000612#W3C_Trademarks">trademark</a>, 2.102 -<a 2.103 -href="http://www.w3.org/Consortium/Legal/copyright-documents-19990405">document 2.104 -use</a> and <a 2.105 -href="http://www.w3.org/Consortium/Legal/copyright-software-19980720">software 2.106 -licensing</a> rules apply. 2.107 -<!--end-include--> 2.108 <hr title="Separator for header"> 2.109 </div> 2.110 2.111 <h2 class="no-num no-toc" id="abstract">Abstract</h2> 2.112 2.113 -<p>HTML provides a "style" attribute on most elements, to hold a fragment of 2.114 -a style sheet that applies to those elements. One of the possible style sheet 2.115 -languages is CSS. This draft describes the syntax of the CSS fragment that 2.116 -can be used in the "style" attribute. 2.117 +<p>Markup languages such as HTML and SVG provide a "style" attribute on most 2.118 +elements, to hold a fragment of a style sheet that applies to those elements. 2.119 +One of the possible style sheet languages is CSS. This draft describes the 2.120 +syntax of the CSS fragment that can be used in the "style" attribute. 2.121 2.122 <h2 class="no-num no-toc" id="status">Status of this document</h2> 2.123 +<!--status--> 2.124 2.125 -<p><em>This section describes the status of this document at the time of its 2.126 -publication.</em> 2.127 +<h2 class="no-num no-toc" id="contents">Table of contents</h2> 2.128 +<!--toc--> 2.129 2.130 -<p>This draft has been produced by the CSS working group as part of the <a 2.131 -href="/Style/">style</a> activity (see <a 2.132 -href="/Style/Activity">summary</a>). It is a public W3C 2.133 -Working Draft for review by W3C members and other interested parties. As a 2.134 -draft document it may be updated, replaced, or obsoleted by other documents 2.135 -at any time. It is inappropriate to use W3C Working Drafts as reference 2.136 -material or to cite them as other than "work in progress." 2.137 +<h2 id="intro">Introduction</h2> 2.138 2.139 -<p>Comments are invited and may be sent to the public mailing list <a 2.140 -href="http://www.w3.org/Mail/Lists#www-style">www-style@w3.org</a> (see <a 2.141 -href="http://www.w3.org/Mail/Request">instructions</a> for subscribing), or 2.142 -to the editors. Discussions should take place on the mailing list. 2.143 +<p>Several XML-based document formats have a "style" attribute to permit the 2.144 +author to directly apply style information to specific elements in documents. 2.145 +If a document format defines a "style" attribute and the attribute accepts CSS 2.146 +as its value, then this specification describes the attribute's syntax and 2.147 +interpretation. 2.148 2.149 -<p>A list of current public W3C Working Drafts can be found at <a 2.150 -href="http://www.w3.org/TR/">http://www.w3.org/TR</a>. 2.151 +<div class="example"> 2.152 + <p>The following example shows the use of the <code>style</code> attribute 2.153 + in HTML:</p> 2.154 + <pre><p style="<em>color: #090; line-height: 1.2</em>">...</p></pre> 2.155 +</div> 2.156 2.157 -<h2 class="no-num no-toc" id="table">Table of contents</h2> 2.158 +<h2 id="syntax">Syntax</h2> 2.159 2.160 -<div> <!--begin-toc--> 2.161 -<ul class="toc"> 2.162 -<li><a href="#history"><span class="secno">1. </span>History</a> 2.163 +<p>The syntax of the style attribute syntax is exactly the same as the 2.164 +contents of a CSS 2.165 +<a href="http://www.w3.org/TR/CSS21/syndata.html#rule-sets">declaration block</a>. 2.166 +A close brace (<code>}</code>) in the style attribute value does not 2.167 +terminate the style data; it is merely an invalid token. 2.168 2.169 -<li><a href="#examples"><span class="secno">2. </span>Examples</a> 2.170 +<p>The same rules for forward-compatible parsing apply to the inline style 2.171 +sheet as to a normal style sheet. See <a href="/TR/CSS21/syndata.html">chapter 2.172 +4 of the CSS2.1 specification</a>. [[!CSS21]] 2.173 2.174 -<li><a href="#grammar"><span class="secno">3. </span>Grammar</a> 2.175 - 2.176 -<li><a href="#cascading"><span class="secno">4. </span>Cascading order</a> 2.177 - 2.178 -<li><a href="#profiles"><span class="secno">5. </span>Profiles</a> 2.179 -<ul class="toc"> 2.180 -<li><a href="#basic"><span class="secno">5.1. </span>Basic 'style' attribute 2.181 -profile</a> 2.182 - 2.183 -<li><a href="#pseudo-rules"><span class="secno">5.2. </span>Pseudo-rules 2.184 -'style' attribute profile</a> 2.185 - 2.186 -<li><a href="#complete"><span class="secno">5.3. </span>Complete style sheet 2.187 -'style' attribute profile</a> 2.188 -</ul> 2.189 - 2.190 -<li><a href="#acknowledgments"><span class="secno">6. 2.191 -</span>Acknowledgments</a> 2.192 - 2.193 -<li><a href="#references"><span class="secno">7. </span>References</a> 2.194 -<ul class="toc"> 2.195 -<li><a href="#normative"><span class="secno">7.1. </span>Normative 2.196 -References</a> 2.197 - 2.198 -<li><a href="#informative"><span class="secno">7.2. </span>Informative 2.199 -References</a> 2.200 -</ul> 2.201 -</ul> 2.202 -<!--end-toc--> </div> 2.203 - 2.204 -<hr> 2.205 - 2.206 -<h2 id="history"><span class="secno">1. </span>History</h2> 2.207 - 2.208 -<p><a href="/TR/REC-html40/">HTML 4.0</a> introduced the <a 2.209 -href="/TR/REC-html40/present/styles#h-14.2.2">"style" attribute</a>, whose 2.210 -contents could contain any styling language (through the use of META 2.211 -http-equiv <a 2.212 -href="/TR/REC-html40/present/styles#h-14.2.1">Content-Style-Type</a>), but by 2.213 -default, and in practice, has only contained CSS. <a 2.214 -href="/TR/xhtml-modularization/">XHTML Modularization</a> introduced the <a 2.215 -href="/TR/xhtml-modularization/abstract_modules#s_styleattributemodule"> 2.216 -Style Attribute Module</a> which also has a "style" attribute whose semantics 2.217 -are the same as that in HTML 4. <a href="/TR/SVG/">SVG</a> also has a 2.218 -language neutral <a href="/TR/SVG/styling#StyleAttribute">"style" 2.219 -attribute</a>, whose language is specified with the contentStyleType 2.220 -attribute which has the default value of "text/css". <a 2.221 -href="/TR/REC-MathML/">MathML</a> states that all MathML elements accept the 2.222 -"style" attribute to facilitate <a 2.223 -href="/TR/REC-MathML/chapter2#sec2.3.4">compatibility with CSS</a>. 2.224 - 2.225 -<p>Not all XML-based document formats have a "style" attribute to permit the 2.226 -user to use CSS to style documents and specific elements in documents, but in 2.227 -case a certain format has a "style" attribute and the attribute accepts CSS 2.228 -as its value, then this specification describes the attribute's syntax and 2.229 -interpretation. 2.230 - 2.231 -<h2 id="examples"><span class="secno">2. </span>Examples</h2> 2.232 - 2.233 -<p>Here are a few examples: 2.234 - 2.235 -<ol> 2.236 -<li>Only setting properties on the element itself, no pseudo-elements or 2.237 -pseudo-classes: 2.238 -<pre><p style="<span class="emph-code">color: #090; line-height: 1.2</span>">...</p></pre> 2.239 - 2.240 -<li>Setting properties on the element, as well as on the first letter of the 2.241 -element, by means of the '::first-letter' pseudo-element. Note that curly 2.242 -braces ({...}) are required in this case: 2.243 -<pre><p style="<span class="emph-code">{color: #090; line-height: 1.2}</span> 2.244 - <span class="emph-code">::first-letter {color: #900}</span>">...</p></pre> 2.245 - 2.246 -<li>Setting properties on a source anchor for each of its dynamic states, 2.247 -using pseudo-classes: 2.248 -<pre><a href="http://www.w3.org/" 2.249 - style="<span class="emph-code">{color: #900}</span> 2.250 - <span class="emph-code">:link {background: #ff0}</span> 2.251 - <span class="emph-code">:visited {background: #fff}</span> 2.252 - <span class="emph-code">:hover {outline: thin red solid}</span> 2.253 - <span class="emph-code">:active {background: #00f}</span>">...</a></pre> 2.254 - 2.255 -<li>Importing a style sheet to apply as a scoped style sheet: 2.256 -<pre><div class="navigation" 2.257 - style="<span class="emph-code">@import url(navigationstyles.css);</span>">...</div></pre> 2.258 -</ol> 2.259 - 2.260 -<p class="note">Note: in CSS1 and CSS2, the spelling of '::first-letter' and 2.261 -'::first-line' is ':first-letter' and ':first-line' respectively, i.e., with 2.262 -a single colon, but Selectors recommends using double colons for 2.263 -pseudo-elements. 2.264 -</p> 2.265 - 2.266 -<p>This document defines both the simple case (only properties on the element 2.267 -itself, example 1), as well as more complex cases such as rules that apply only to the element 2.268 - (e.g. properties on the element's pseudo-elements and pseudo-classes, examples 2 and 3), 2.269 - and scoped style sheets (the use of @import which apples the referenced style sheet 2.270 - to the subdocument consisting of the element and its children with the element as the root, 2.271 - example 4). 2.272 -</p> 2.273 - 2.274 -<h2 id="grammar"><span class="secno">3. </span>Grammar</h2> 2.275 - 2.276 -<p class=issue>[The grammar is ambiguous, e.g., for ":hover {color: 2.277 -red}". See 2.278 -http://lists.w3.org/Archives/Public/www-style/2008Jan/0419.html] 2.279 +<h2 id="grammar">Grammar</h2> 2.280 2.281 <p>The syntax of the CSS fragment that is allowed in the HTML "style" 2.282 attribute can be formally specified as follows: 2.283 2.284 <pre> 2.285 inline-stylesheet 2.286 - : S* [ declarations | declarations-block | inline-ruleset* | stylesheet ] 2.287 + : S* declaration-block 2.288 ; 2.289 2.290 -declarations 2.291 +declaration-block 2.292 : declaration [ ';' S* declaration ]* 2.293 ; 2.294 - 2.295 -declarations-block 2.296 - : '{' S* declarations '}' S* 2.297 - ; 2.298 - 2.299 -inline-ruleset 2.300 - : [ pseudo* S* [ ',' S* pseudo* S* ]* ]? 2.301 - declarations-block 2.302 - ; 2.303 </pre> 2.304 2.305 -<p>Please refer to the grammar in <a href="/TR/REC-CSS2/grammar">appendix D 2.306 -of the CSS2 specification</a> <a href="#CSS2" rel="biblioentry">[CSS2]</a> 2.307 -for the definition of the symbols not defined here. 2.308 +<p>Please refer to the grammar in <a href="/TR/CSS21/grammar.html">appendix D 2.309 +of the CSS2.1 specification</a> [[!CSS21]] for the definition of the symbols 2.310 +not defined here. 2.311 2.312 -<p>The same rules for forward-compatible parsing apply to the inline style 2.313 -sheet as to a normal style sheet. See <a href="/TR/REC-CSS2/syndata">chapter 2.314 -4 of the CSS2 specification</a>. 2.315 +<h2 id="cascading">Cascading order</h2> 2.316 2.317 -<h2 id="cascading"><span class="secno">4. </span>Cascading order</h2> 2.318 +<p>The declarations in a style attribute apply to the element to which 2.319 +the attribute belongs. CSS2.1 <a href="/TR/CSS21/cascade.html#specificity">defines</a> 2.320 +how style sheets and "style" attributes are cascaded together. [[!CSS21]] 2.321 2.322 -<p>CSS already <a href="/TR/REC-CSS2/cascade#specificity">defines</a> how 2.323 -style sheets and "style" attributes are cascaded together for the case where 2.324 -the inline fragment consists of declarations only. 2.325 - 2.326 -<p>In addition to simple declarations, the style attribute is now permitted 2.327 -to take rulesets. These rules have the additive specificity of their 2.328 -selectors in addition to the specificity of the style attribute. The examples 2.329 -indicate what is added to each of the specificity components using the 2.330 -familiar '+=' notation. 2.331 - 2.332 -<p>Example: 2.333 - 2.334 -<pre><p style="<span class="emph-code">{color: green; width: 10em}</span> /* a+=0 b+=0 c+=0 */ 2.335 - <span class="emph-code">::first-letter {float: left; font-size: 300%}</span> /* a+=0 b+=0 c+=1 */ 2.336 - "> 2.337 - This is an example of a paragraph with inline style attribute rules 2.338 - to create a spot effect, in this case, a drop-cap first letter. 2.339 -</p></pre> 2.340 - 2.341 -<p>Example: 2.342 - 2.343 -<pre><a href="http://www.w3.org/Style/CSS" 2.344 - style="<span class="emph-code">{color: blue; background: white}</span> /* a+=0 b+=0 c+=0 */ 2.345 - <span class="emph-code">:visited {color: green}</span> /* a+=0 b+=1 c+=0 */ 2.346 - <span class="emph-code">:hover {background: yellow}</span> /* a+=0 b+=1 c+=0 */ 2.347 - <span class="emph-code">:visited:hover {color: purple}</span> /* a+=0 b+=2 c+=0 */ 2.348 - "> 2.349 - Example of a hyperlink to the CSS home page with special one-off 2.350 - visited and hover effects. 2.351 -</a></pre> 2.352 - 2.353 -<h2 id="profiles"><span class="secno">5. </span>Profiles</h2> 2.354 - 2.355 -<p>Several profiles are provided for implementation conformance. The profiles 2.356 -are of increasing power and complexity. Each profile is a superset of, and 2.357 -backwards compatible with, all profiles that preceed it. This permits 2.358 -implementations to first implement simpler profiles, and later implement more 2.359 -powerful ones. An implementation must implement at least one profile in order 2.360 -to be conformant. 2.361 - 2.362 -<p> Each profile defines a subset of CSS syntax that a 'style' attribute 2.363 -allows and excludes by listing both the grammar productions for 2.364 -inline-stylesheet which are accepted, and those which are excluded. 2.365 -Productions which are excluded by a profile are to be treated as 2.366 -unrecognized, and ignored, according to the rules for forward-compatible 2.367 -parsing. See <a href="http://www.w3.org/TR/REC-CSS2/syndata">chapter 4 of the 2.368 -CSS2 specification</a>. 2.369 - 2.370 -<div class="profile"> 2.371 -<h3 id="basic"><span class="secno">5.1. </span>Basic 'style' attribute 2.372 -profile</h3> 2.373 - 2.374 -<table border="1" class="tprofile" width="75%"> 2.375 -<tbody> 2.376 -<tr> 2.377 -<th class="title" colspan="2">Basic profile 2.378 - 2.379 -<tr> 2.380 -<th>Accepts 2.381 - 2.382 -<td> 2.383 -<ul> 2.384 -<li>declarations 2.385 - 2.386 -<li>declarations-block 2.387 -</ul> 2.388 - 2.389 -<tr> 2.390 -<th>Excludes 2.391 - 2.392 -<td> 2.393 -<ul> 2.394 -<li>inline-ruleset 2.395 - 2.396 -<li>stylesheet 2.397 -</ul> 2.398 - 2.399 -<tr> 2.400 -<th>Extra constraints 2.401 - 2.402 -<td> 2.403 -<p>Implementations are required to support the declarations-block syntax. 2.404 -This was ambiguous/unclear in CSS1 and CSS2, and is made explicit by this 2.405 -document. 2.406 - 2.407 -<tr> 2.408 -<th>Comments 2.409 - 2.410 -<td>This profile corresponds to CSS level 1 & 2. 2.411 -</table> 2.412 -</div> 2.413 - 2.414 -<div class="profile"> 2.415 -<h3 id="pseudo-rules"><span class="secno">5.2. </span>Pseudo-rules 'style' 2.416 -attribute profile</h3> 2.417 - 2.418 -<table border="1" class="tprofile" width="75%"> 2.419 -<tbody> 2.420 -<tr> 2.421 -<th class="title" colspan="2">Pseudo-rules profile 2.422 - 2.423 -<tr> 2.424 -<th>Accepts 2.425 - 2.426 -<td> 2.427 -<ul> 2.428 -<li>declarations 2.429 - 2.430 -<li>declarations-block 2.431 - 2.432 -<li>inline-ruleset 2.433 -</ul> 2.434 - 2.435 -<tr> 2.436 -<th>Excludes 2.437 - 2.438 -<td> 2.439 -<ul> 2.440 -<li>stylesheet 2.441 -</ul> 2.442 - 2.443 -<tr> 2.444 -<th>Extra constraints 2.445 - 2.446 -<td> 2.447 -<p>None. 2.448 - 2.449 -<tr> 2.450 -<th>Comments 2.451 - 2.452 -<td>This profile is new and defined by CSS level 3. 2.453 -</table> 2.454 -</div> 2.455 - 2.456 -<div class="profile"> 2.457 -<h3 id="complete"><span class="secno">5.3. </span>Complete style sheet 2.458 -'style' attribute profile</h3> 2.459 - 2.460 -<table border="1" class="tprofile" width="75%"> 2.461 -<tbody> 2.462 -<tr> 2.463 -<th class="title" colspan="2">Complete style sheet profile 2.464 - 2.465 -<tr> 2.466 -<th>Accepts 2.467 - 2.468 -<td> 2.469 -<ul> 2.470 -<li>declarations 2.471 - 2.472 -<li>declarations-block 2.473 - 2.474 -<li>inline-ruleset 2.475 - 2.476 -<li>stylesheet 2.477 -</ul> 2.478 - 2.479 -<tr> 2.480 -<th>Excludes 2.481 - 2.482 -<td> 2.483 -<p>N/A. 2.484 - 2.485 -<tr> 2.486 -<th>Extra constraints 2.487 - 2.488 -<td> 2.489 -<p>None. 2.490 - 2.491 -<tr> 2.492 -<th>Comments 2.493 - 2.494 -<td>This profile is new and defined by CSS level 3. 2.495 -</table> 2.496 -</div> 2.497 - 2.498 -<h2 id="acknowledgments"><span class="secno">6. </span>Acknowledgments</h2> 2.499 +<h2 id="ack">Acknowledgments</h2> 2.500 2.501 <p>Thanks to feedback from Daniel Glazman, Ian Hickson, Eric A. Meyer, 2.502 Björn Höhrmann. 2.503 2.504 -<h2 id="references"><span class="secno">7. </span>References</h2> 2.505 +<h2 id="references">References 2.506 2.507 -<h3 id="normative"><span class="secno">7.1. </span>Normative References</h3> 2.508 +<h3 class="no-num" id="normative-references">Normative references</h3> 2.509 2.510 -<dl class="bibliography"> 2.511 -<dt id="CSS2">[CSS2] 2.512 +<!--begin-normative--> 2.513 +<p>[Here will be inserted the file "normative.inc"]</p> 2.514 +<!--end-normative--> 2.515 2.516 -<dd>Bert Bos; Håkon Wium Lie; Chris Lilley; Ian Jacobs. <cite>Cascading 2.517 -Style Sheets, level 2.</cite> 12 May 1998. W3C Recommendation. URL: <a 2.518 -href="http://www.w3.org/TR/REC-CSS2/">http://www.w3.org/TR/REC-CSS2</a> 2.519 +<h3 class="no-num" id="informative-references">Informative references</h3> 2.520 2.521 -<dt id="HTML40">[HTML40] 2.522 +<!--begin-informative--> 2.523 +<p>[Here will be inserted the file "informative.inc"]</p> 2.524 +<!--end-informative--> 2.525 2.526 -<dd>Raggett, D.; Le Hors, A.; Jacobs, I.. <cite>HTML 4.0 2.527 -Specification.</cite> 8 July 1997. W3C Recommendation. URL: <a 2.528 -href="http://www.w3.org/TR/REC-html40/">http://www.w3.org/TR/REC-html40</a> 2.529 -</dl> 2.530 - 2.531 -<h3 id="informative"><span class="secno">7.2. </span>Informative References</h3> 2.532 - 2.533 -<dl class="bibliography"> 2.534 -<dt id="MathML">[MathML] 2.535 - 2.536 -<dd>Patrick Ion; Robert Miner. <cite> Mathematical Markup Language 2.537 -(MathML<span class="tm">™</span>) 1.01</cite> 7 July 1999. W3C Recommendation. 2.538 -URL: <a 2.539 -href="http://www.w3.org/TR/REC-MathML/">http://www.w3.org/TR/REC-MathML</a> 2.540 - 2.541 -<dt id="SVG10">[SVG10] 2.542 - 2.543 -<dd>Jon Ferraiolo ed. <cite> Scalable Vector Graphics (SVG) 1.0 2.544 -Specification.</cite> 5 September 2001. W3C Recommendation. URL: <a 2.545 -href="http://www.w3.org/TR/SVG/">http://www.w3.org/TR/SVG</a> 2.546 - 2.547 -<dt id="XHTMLMOD">[XHTMLMOD] 2.548 - 2.549 -<dd><cite>Modularization of XHTML<span class="tm">™</span>.</cite> 2.550 -10 April 2001. W3C Recommendation. URL: <a 2.551 -href="http://www.w3.org/TR/xhtml-modularization/">http://www.w3.org/TR/xhtml-modularization</a> 2.552 -</dl> 2.553 </body> 2.554 </html> 2.555 <!-- Keep this comment at the end of the file