@@ -1364,24 +1364,25 @@ <h3 class=no-num id=default-parens> Generating Parentheses</h3>
13641364 < p > Unfortunately, because Selectors cannot match against text nodes, it's
13651365 not possible with CSS to express rules that will automatically and
13661366 correctly add parentheses to unparenthesized ruby annotations in HTML.
1367- However, an author rigorously using < code > <rtc></ code > elements
1368- around all annotations can use CSS Level 2 generated content < a
1369- href ="#CSS21 " rel =biblioentry > [CSS21]<!--{{!CSS21}}--> </ a > to generate
1370- parentheses:
1367+ (This is because HTML ruby allows implying the < a
1368+ href ="#ruby-base "> < i > ruby base</ i > </ a > from raw text, without a
1369+ corresponding element.) However, these rules will handle cases where
1370+ either < code > <rb></ code > or < code > <rtc></ code > is used
1371+ rigorously.
13711372
13721373 < pre >
1374+ <!-- --> /* Parens around <rtc> */
13731375<!-- --> rtc::before { content: "("; }
1374- <!-- --> rtc::after { content: ")"; }</ pre >
1376+ <!-- --> rtc::after { content: ")"; }
13751377
1376- < p > Alternatively, an author rigorously using both < code > <rb> </ code >
1377- and < code > <rt> </ code > elements but no < code > <rtc> </ code >
1378- elements can use these rules instead:
1378+ <!-- --> /* Parens before first <rt > not inside <rtc > */
1379+ <!-- --> rb + rt::before,
1380+ <!-- --> rtc + rt::before { content: "("; }
13791381
1380- < pre >
1381- <!-- --> rb + rt::before { content: "("; }
1382- <!-- --> rt:last-child::after, rt + rb::before { content: ")"; }</ pre >
1383-
1384- < p class =Issue > Try to make these smarter somehow?
1382+ <!-- --> /* Parens after <rt> not inside <rtc> */
1383+ <!-- --> rb ~ rt:last-child::after,
1384+ <!-- --> rt + rb::before { content: ")"; }
1385+ <!-- --> rt + rtc::before { content: ")("; }</ pre >
13851386
13861387 < h2 id =glossary > < span class =secno > 4. </ span > Glossary</ h2 >
13871388
0 commit comments