Re: Expected behaviour of quotation marks

> On Apr 8, 2016, at 09:57, Florian Rivoal <florian@rivoal.net> wrote:
> 
> 
>> 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.

(New URL for the demo http://florian.rivoal.net/csswg/nested-quotes.html)

Silly me. It also works in Vivliostyle (running in any browser) :)

http://vivliostyle.github.io/vivliostyle.js/viewer/vivliostyle-viewer.html#x=http://florian.rivoal.net/csswg/nested-quotes.html

 - Florian
Vivliostyle

Received on Friday, 8 April 2016 01:08:39 UTC