-
Notifications
You must be signed in to change notification settings - Fork 746
Description
A.3 Generating Parentheses
https://drafts.csswg.org/css-ruby-1/#default-parens
This section seems both a little oversimplified and overcomplicated at the same time.
I think there are three scenarios:
- rp markup is used
- no rp, but interleaved markup
- no rp and tabular markup
and they all need to be treated differently.
When rp
is used, CSS needs to make therp
content visible.
Unfortunately, because Selectors cannot match against text nodes, it’s not possible with CSS to express rules that will automatically and correctly add parentheses to unparenthesized ruby annotations in HTML.
Actually, unless i'm missing something, it's easy in case 2. Simply mark up the rt
as follows:
rt { display: inline; font: inherit; ...}
rt::before { content: '('; }
rt::after { content: ')'; }
For case 3, the rb
tags need to be specified anyway, if it's really tabular (ie. involving more than one rb
), so again i don't think the quoted text above is needed.
The problem is how to know whether you're dealing with case 1, 2 or 3, if there's a mix.
To be honest, this all seems rather complicated, and i find myself wishing i had an 'inline' property, like we used to, so that the browser could take care of this simply for me.