W3C home > Mailing lists > Public > public-digipub-ig@w3.org > April 2016

Re: Expected behaviour of quotation marks

From: Florian Rivoal <florian@rivoal.net>
Date: Fri, 8 Apr 2016 09:57:34 +0900
Cc: Dave Cramer <dauwhe@gmail.com>, W3C Digital Publishing IG <public-digipub-ig@w3.org>, www International <www-international@w3.org>
Message-Id: <12FF5B05-CD9F-4259-B030-9CE89CDE2C22@rivoal.net>
To: ishida@w3.org

> On Apr 7, 2016, at 23:39, ishida@w3.org wrote:


> Perhaps what we need is a CSS rule that says, 'If you're not inside a q element, then set the quotes per the language outside the quote; but if you are inside, ignore the language info.'

Sounds right.

> I'm not quite sure how to say that in selector-speak yet.

I believe this is the way to right it:

:lang(fr) > *:not(q *) { quotes: "« " " »" "‹ " " ›" }
:lang(en) > *:not(q *) { quotes: "“" "”" "‘" "’" }

Here's a demo:
  http://jsbin.com/savatoqala/edit?html,css,output

This only seems to Safari (not Chrome) implements :not() well enough to support this, but I believe it is correct by spec, and it does work in Safari.

 - Florian
Received on Friday, 8 April 2016 00:58:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:36:26 UTC