Skip to content

Commit de0024a

Browse files
committed
[dbaron revision history] Add vendor text from Bert. Fix some references. (date: 2003/07/14 18:46:13)
1 parent d60fc8b commit de0024a

1 file changed

Lines changed: 60 additions & 30 deletions

File tree

css3-syntax/Overview.src.html

Lines changed: 60 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ <h2>CSS style sheet representation</h2>
151151
<li>A character set specified by a higher level protocol (e.g., the
152152
"charset" parameter to the MIME type specified in an HTTP "Content-Type"
153153
field).
154-
(The HTTP protocol ([[RFC2616]], section 3.7.1) mentions ISO-8859-1 as a
154+
(The HTTP protocol ([[HTTP11]], section 3.7.1) mentions ISO-8859-1 as a
155155
default character encoding when the "charset" parameter is absent from
156156
the "Content-Type" header field. In practice, this recommendation has
157157
proved useless because some servers don't allow a "charset" parameter to
@@ -262,9 +262,9 @@ <h3 id="text-css"><span class="index-def" title="text/css">The text/css content
262262
information<!--(see [[HTML40]], chapter 5)-->. The structure of the
263263
transmission, termed a <span class="index-def" title="message
264264
entity"><a name="message-entity"><strong>message
265-
entity,</strong></a></span> is defined by RFC 2045 and RFC 2068 (see
266-
[[RFC2045]] and [[RFC2068]]). A message entity with a content type of
267-
"text/css" represents an independent CSS document. The "text/css"
265+
entity,</strong></a></span> is defined by MIME and HTTP 1.1 (see
266+
[[!RFC2045]] and [[!HTTP11]]). A message entity with a content type of
267+
"text/css" represents an independent CSS style sheet. The "text/css"
268268
content type has been registered by RFC 2318 ([[!RFC2318]]).</p>
269269

270270
<h2 id="syntax">General syntax of CSS</h2>
@@ -936,33 +936,63 @@ <h3>Partial implementations</h3>
936936

937937
<h2>Vendor-specific extensions</h2>
938938

939-
<p>
940-
CSS3, unlike CSS1 or CSS2, allows identifiers to begin with <span
941-
class="css">'-'</span>. <span class="issue">[Should the grammar allow
942-
'-' as part of identifiers or should it require that vendors who use '-' to
943-
begin identifiers extend the grammar in their tokenizer?]</span> Property
944-
names and keywords beginning with <span class="css">'-'</span> are reserved
945-
for vendor-specific extensions. Property names and keywords in
946-
vendor-specific extensions should have the format
947-
</p>
939+
<p>Although proprietary extensions should be avoided in general, there
940+
are situations (experiments, implementations of W3C drafts that have not
941+
yet reached Candidate Recommendation, intra-nets, debugging, etc.) where
942+
it is convenient to add some nonstandard, i.e., proprietary identifiers
943+
to a CSS style sheet. It is often hard to predict how long these
944+
proprietary extensions will be in use and hard to avoid that their names
945+
clash with new, standard properties or with other proprietary
946+
properties. Therefore the CSS Working Group proposes the following
947+
simple naming convention. A proprietary name should have a prefix
948+
consisting of:</p>
948949

949-
<pre>
950-
'-' + vendor identifier + '-' + meaningful name
951-
</pre>
950+
<ol>
951+
<li>an underscore ("_") or a dash ("-"),</li>
952+
<li>the (possibly abbreviated) name of the company, organization, etc. that
953+
created it,</li>
954+
<li>an underscore or a dash.</li>
955+
</ol>
952956

953-
<p>
957+
<p>Some examples (and the companies/organizations that created them):</p>
958+
<ul>
959+
<li><em>-moz-box-sizing,</em> <em>-moz-border-radius</em> (The Mozilla
960+
Organization)</li>
961+
<li><em>-wap-accesske</em>y (The WAP Forum)</li>
962+
<li><em>_xyz-dwiw</em> (hypothetical)</li>
963+
</ul>
954964

955-
For example, if XYZ Corp. added a property to describe the color
956-
of the border on the East side of the display, they might
957-
call it <span class="css">-xyz-border-east-color</span>. Other
958-
CSS implementations will not recognize the property and will
959-
ignore it according to the <a href="#parsing-errors">rules
960-
for handling parsing errors</a>.
965+
<p>The advantage of the initial dash is that it is not a valid start character
966+
for identifiers in CSS, so it is guaranteed never to be used by any current or
967+
future level of CSS. CSS-conforming parsers will skip rules that contain
968+
identifiers with such a character.
969+
<span class="issue">[Should the grammar allow
970+
'-' as part of identifiers or should it require that vendors who use '-' to
971+
begin identifiers extend the grammar in their tokenizer? Currently it
972+
does, but perhaps it shouldn't.]</span></p>
961973

962-
</p>
974+
<p>That is also a possible disadvantage: a conforming parser will skip them,
975+
so in order to use them, an extended parser is required.</p>
976+
977+
<p>For that reason, the underscore is also proposed. Although it is a valid
978+
start character, the CSS Working Group believes it will never define any
979+
identifiers that start with that character.</p>
980+
981+
<h3 class="no-num no-toc">Historical notes</h3>
963982

964-
<p class="issue">This needs to be reconciled with <a
965-
href="../css3-naming/">Bert's document</a> describing the same thing.</p>
983+
<p>Microsoft created a number of proprietary properties for use inside their
984+
Microsoft Office product, at a time when there was not yet a consensus in the
985+
working group about the naming convention. They chose to prefix properties
986+
with "mso-" rather than "-mso-".</p>
987+
988+
<p>At the time of writing, the following prefixes are known to exist:</p>
989+
<ul>
990+
<li><em>mso-</em> (Microsoft Corporation)</li>
991+
<li><em>-moz-</em> (The Mozilla Organization)</li>
992+
<li><em>-opera-</em> (Opera Software)</li>
993+
<li><em>-atsc</em>- (Advanced Television Standards Committee)</li>
994+
<li><em>-wap-</em> (The WAP Forum)</li>
995+
</ul>
966996

967997
<h2>Associating style sheets with documents</h2>
968998

@@ -1232,7 +1262,7 @@ <h2 id="conf">Conformance</h2>
12321262
class="index-def" title="RECOMMENDED">"RECOMMENDED"</span>, <span
12331263
class="index-def" title="MAY">"MAY"</span>, and <span
12341264
class="index-def" title="OPTIONAL">"OPTIONAL"</span> in this document
1235-
are to be interpreted as described in RFC&nbsp;2119 (see [[RFC2119]]).
1265+
are to be interpreted as described in RFC&nbsp;2119 (see [[!RFC2119]]).
12361266
However, for readability, these words do not appear in all uppercase
12371267
letters in this specification.</p>
12381268

@@ -1299,7 +1329,7 @@ <h3>Definitions</h3>
12991329
<dt><strong><span class="index-def" title="element"><a
13001330
name="element">Element</a></span></strong>
13011331

1302-
<dd>(An SGML term, see [[ISO8879]].) The primary syntactic constructs
1332+
<dd>(An SGML term, see [[!ISO8879]].) The primary syntactic constructs
13031333
of the document language. Most CSS style sheet rules use the names of
13041334
these elements (such as P, TABLE, and OL in HTML) to specify
13051335
how the elements should be rendered.
@@ -1428,7 +1458,7 @@ <h3>Definitions</h3>
14281458
to another format, etc.</dd>
14291459

14301460
<DD>An HTML user agent is one that supports the HTML 2.x, HTML 3.x, or
1431-
HTML 4.x specifications. A user agent that supports XHTML [[-XHTML]],
1461+
HTML 4.x specifications. A user agent that supports XHTML [[XHTML10]],
14321462
but not HTML (as listed in the previous sentence) is not considered an
14331463
HTML user agent for the purpose of conformance with this
14341464
specification.
@@ -1488,7 +1518,7 @@ <h3 id="conf-UA">User agent conformance</h3>
14881518
href="cascade.html">cascading and inheritance</a>.
14891519

14901520
<li>If the source document comes with alternate style sheet sets (such as
1491-
with the "alternate" keyword in HTML 4.0 [[-HTML40]]), the UA must
1521+
with the "alternate" keyword in HTML 4.0 [[HTML40]]), the UA must
14921522
allow the user to select which style sheet set the UA should apply.
14931523

14941524
</ol>

0 commit comments

Comments
 (0)