Re: Wiki summary of q element default styling issues

> 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