Skip to content

Commit 6c8798c

Browse files
committed
[css2] Added section on language-dependent quotes, fixed bugs in :before/:after section to allow inline and block-level generated content
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%40907
1 parent bd9ba93 commit 6c8798c

1 file changed

Lines changed: 56 additions & 14 deletions

File tree

css2/generate.src

Lines changed: 56 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@ class="index-def" title=":after|pseudo-elements:::after">:after</span>
3939
pseudo elements and the <span
4040
class="propinst-content">'content'</span> property</h2>
4141

42-
<p>Authors specify generated content with the :before and :after
43-
pseudo-elements. The <span class="propinst-content">'content'</span>
44-
property of these pseudo-elements specifies what is inserted. :before
45-
and :after <a href="cascade.html#inheritance">inherit</a> any
46-
inheritable properties from the element to which they are
47-
attached.</p>
42+
<p>Authors specify the location of generated content with the :before
43+
and :after pseudo-elements. The <span
44+
class="propinst-content">'content'</span> property, in conjunction
45+
with these pseudo-elements, specifies what is inserted. The :before
46+
and :after pseudo-elements <a
47+
href="cascade.html#inheritance">inherit</a> any inheritable properties
48+
from the element to which they are attached.</p>
49+
4850

4951
<div class=example>
5052
<p>For example, the following rule inserts a double quote mark
@@ -84,18 +86,23 @@ BODY:after {
8486
<!-- #include src=properties/content.srb -->
8587

8688
<p>The value of the <span class="propinst-content">'content'</span>
87-
property is a sequence of strings, URIs, and counters. The various
88-
parts are laid out as inline boxes inside the element.</p>
89+
property is a sequence of strings, URIs, and counters. The <span
90+
class="propinst-display">'display'</span> property controls whether
91+
the content is placed in an inline box or a block-level box; only the
92+
values 'block', 'inline', and 'none' are permitted). The initial value
93+
is 'inline'.
8994

9095
<P>The values have the following meanings:</p>
9196

9297
<dl>
9398
<dt><span class="index-def" title="&lt;string&gt;, definition of"><a
9499
name="value-def-string"><strong>&lt;string&gt;</strong></a></span>
95-
<dd>??
100+
<dd>The value is assumed to be a string.
101+
<dt><span class="index-inst" title="&lt;uri&gt;"><span class="value-inst-uri"><strong>&lt;uri&gt;</strong></span></span>
102+
<dd>The value is a URI.
96103
<dt><span class="index-def" title="&lt;counter&gt;, definition of"><a
97104
name="value-def-counter"><strong>&lt;counter&gt;</strong></a></span>
98-
<dd>??
105+
<dd>[To be defined].
99106
</dl>
100107

101108
<div class=note>
@@ -107,10 +114,6 @@ pseudo-element is all in one style.
107114
</em></p>
108115
</div>
109116

110-
<p>[How to do language-dependent quotes? [LANG=fr] Q:before{content:
111-
"�"} doesn't work. How about Q:fr-fr:before {content: "�"} ? or @lang
112-
fr-fr {Q:before{content: "�"}} ?]</p>
113-
114117
<p>Newlines can be included in the generated content by writing the
115118
"\A" (or "\00000A") escape sequence in one of the strings after the
116119
<span class="propinst-content">'content'</span> property. This inserts
@@ -138,6 +141,45 @@ reparsing).
138141
</em>
139142
</div>
140143

144+
<h2><a name="quotes">Language-dependent quotation marks</a></h2>
145+
146+
<!-- #include src=properties/quotes.srb -->
147+
148+
<P>So that user agents may handle nested quotation marks in a
149+
language-dependent way, CSS provides the <span
150+
class="propinst-quotes">'quotes'</span> property. The value of this
151+
property is a list of pairs of quotation marks (opening and
152+
closing). The first (leftmost) pair represents the outermost level of
153+
quotation, the second pair the first level of embedding, etc. The user
154+
agent must apply the appropriate pair of quotation marks according to
155+
the level of embedding.
156+
157+
<P>Applying the following style sheet:</p>
158+
159+
<PRE class="example">
160+
[LANG|="en"] { quoting: �"� �"� "�" "�" �"� �"� }
161+
[LANG|="fr"] { quoting: "� " " �" �"� �"� "�" "�" }
162+
[LANG|="no"] { quoting: "�" "�" "'" "'" "\"" "\"" }
163+
[LANG|="se"] { quoting: "�" "�" �"� �"� "�" "�" }
164+
</PRE>
165+
166+
<P>to the following HTML fragment:</p>
167+
168+
<PRE class="html-example">
169+
&lt;BODY lang="en"&gt;
170+
&lt;P&gt;&lt;Q&gt;Quote me!&lt;/Q&gt;
171+
&lt;P LANG="no"&gt;&lt;Q&gt;Siter &lt;Q&gt;meg&lt;/Q&gt;!&lt;/Q&gt;
172+
&lt;/BODY&gt;
173+
</PRE>
174+
175+
<P>would allow a user agent to render:</p>
176+
177+
<PRE>
178+
"Quote me!"
179+
180+
�Siter 'meg'!�
181+
</PRE>
182+
141183
<h2>Automatic counters and numbering</h2>
142184

143185
<P><em>This is a placeholder.</em>

0 commit comments

Comments
 (0)