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

Re: Wiki summary of q element default styling issues

From: Florian Rivoal <florian@rivoal.net>
Date: Tue, 26 Apr 2016 00:40:27 +0900
Cc: ishida@w3.org, "Asmus Freytag (c)" <asmusf@ix.netcom.com>, www International <www-international@w3.org>, W3C Digital Publishing IG <public-digipub-ig@w3.org>
Message-Id: <79A8A7F7-5C19-4D03-94B0-DFD57121926C@rivoal.net>
To: John Cowan <cowan@mercury.ccil.org>

> On Apr 25, 2016, at 22:35, John Cowan <cowan@mercury.ccil.org> wrote:
> 
>> I don't understand this.  Why would i need to add a class to every q
>> element?  Surely you'd only need to introduce a class for quotations
>> when you don't want to follow the default - and if you're using CSS
>> properly, often you don't even need class names then either, since
>> the selectors can be written to understand the context in which a q
>> element sits. 
> 
> Is CSS capable of specifying alternation of marks in nested quotations
> to arbitrary depths?  My understanding is that it is not.

I think this should do it:

  q { quotes: toggle("<" ">", "「" "」"); }

https://drafts.csswg.org/css-values/#funcdef-toggle

And even if this function is not implemented, hardcoding things in the markup does not give you more flexibility than doing it with css. The way markup handles arbitrary depth of alternating quotes is by writing the alternating quotes manually. If you can manually write 5, 12, or 57 levels of nested quotes, you can manually writing 5, 12, or 57 level of nested selectors.

 - Florian
Received on Monday, 25 April 2016 15:40:54 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 25 April 2017 10:44:42 UTC