- From: Florian Rivoal <florian@rivoal.net>
- Date: Fri, 8 Apr 2016 09:57:34 +0900
- To: ishida@w3.org
- Cc: Dave Cramer <dauwhe@gmail.com>, W3C Digital Publishing IG <public-digipub-ig@w3.org>, www International <www-international@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