[Bug 15174] New: rendering.html quotes rules don't allow inheritance of author-specified 'quotes'

https://www.w3.org/Bugs/Public/show_bug.cgi?id=15174

           Summary: rendering.html quotes rules don't allow inheritance of
                    author-specified 'quotes'
           Product: HTML WG
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: HTML5 spec (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: peter.moulder@monash.edu
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org


The following document fragment:

  <p lang="en" style="quotes: '« ' ' »'">Hello <q>world</q></p>

when rendered with the UA stylesheet rules suggested in rendering.html
(specifically those in §14.3.6 Quotes), will result in

  Hello “world”

rather than

  Hello « world »

as the author probably intended.  This is because the q element matches the
:lang(en) { quotes: ... } suggested stylesheet rule rather than inheriting.

The solution suggested by Simon Sapin of WeasyPrint is (if I understand
correctly) to change the quotes rules to

  :root:lang(en), [lang]:lang(en) { quotes: ... }

This results in the desired

  Hello « world »

The reason for the :root:lang(en) part is for the case where :lang is
determined by e.g. Content-Language.

The reason I write [lang]:lang(en) above rather than [lang|=en i] is that I'm
not sure whether current bcp47 requires something more sophisticated than a
simple string test: I think it might require looking up a database to check for
implied prefixes.  (Sorry, I haven't read it very carefully.)  Anyway, the
point of mentioning this is just that you might choose to replace
[lang]:lang(en) with [lang|=en i] or the like if in fact that is equivalent.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Wednesday, 14 December 2011 01:06:58 UTC