- From: Anton Prowse <prowse@moonhenge.net>
- Date: Sun, 08 Jan 2012 12:56:42 +0100
- To: "www-style@w3.org" <www-style@w3.org>
- CC: "L. David Baron" <dbaron@dbaron.org>, Simon Sapin <simon.sapin@kozea.fr>
On 06/12/2011 18:01, L. David Baron wrote: > On Monday 2011-12-05 17:51 +0100, Simon Sapin wrote: >> Both section 12.3.2 of CSS 2.1 and section 4.1 of Generated Content >> 3 use the same text to describe the quotes nesting level for the >> `quotes` property and the `open-quote` and `close-quote` values of >> the `content` property: >> >> """ >> ‘Open-quote’ refers to the first of a pair of quotes, ‘close-quote’ >> refers to the second. Which pair of quotes is used depends on the >> nesting level of quotes: the number of occurrences of ‘open-quote’ >> in all generated text before the current occurrence, minus the >> number of occurrences of ‘close-quote’. If the depth is 0, the first >> pair is used, if the depth is 1, the second pair is used, etc. If >> the depth is greater than the number of pairs, the last pair is >> repeated. >> """ >> >> For the quotes to be balanced and match the examples, the nesting >> level should be more accurately described as: >> >> the number of occurrences of ‘open-quote’ in all generated text >> before the current occurrence *excluding the current occurrence*, >> minus the number of occurrences of ‘close-quote’ before the current >> occurrence *including the current occurrence*. >> >> Of course this sentence is much too heavy but I couldn’t find a >> better way to explain it in prose. > > I think either way is only an approximation of the rules, since > neither one accounts for the rule (at the end of the same paragraph, > in CSS 2.1) that describes what happens when the quotes nesting > level is attempted to be reduced below 0. I think it might make > more sense to reword things so that part of the paragraph is an > approximate summary of the behavior, followed by an exact set of > rules. For example: > > 'Open-quote' refers to the first of a pair of quotes, > 'close-quote' refers to the second. Which pair of quotes is used > depends on the nesting level of quotes. The nesting level begins > at 0 at the start of the document, and then, by a depth-first > traversal of the document, it is incremented at every occurrence > of 'open-quote' or 'no-open-quote', and decremented at every > occurrence of 'close-quote' or 'no-close-quote' other than those > that would make it negative. The quotation mark rendered for an > open-quote is the first quotation mark in the pair of quotes at > the nesting level after that open-quote, unless that nesting level > is greater than the number of pairs, in which case the first > quotation mark in the last pair is repeated. Likewise, for > close-quote, the quotation mark rendered is the second quotation > mark in the pair of quotes at the nesting level before that > close-quote, unless that nesting level is greater than the number > of pairs, in which case the second quotation mark in the last pair > is repeated, or unless that depth is 0, in which case no quotation > mark is rendered. Simon, David: this bug is tracked at https://www.w3.org/Bugs/Public/show_bug.cgi?id=15449 Cheers, Anton Prowse http://dev.moonhenge.net
Received on Sunday, 8 January 2012 11:57:16 UTC