E474 [css-ruby-1] Add properties to make the UA deal with inlining ruby and generating parentheses · Issue #761 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content

[css-ruby-1] Add properties to make the UA deal with inlining ruby and generating parentheses #761

@r12a

Description

@r12a

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:

  1. rp markup is used
  2. no rp, but interleaved markup
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    css-ruby-1Current Workcss-ruby-2i18n-needs-resolutionIssue the Internationalization Group has raised and looks for a response on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0