Skip to content

[css-ruby] define the height of the content area of ruby containers #4936

Closed

Description

@frivoal

(See also #4935 for a related but different issue)

  • The ruby container box is defined to be an inline-level box (in 2.2.1 (but not an inline box)

  • "In most respects, ruby boxes can be styled similar to inline boxes." (in 3)

Section 3 defines the "measure" (i.e. width) of the ruby container (presumably this is about the width of the content box, and padding/border/margins go outside), but it does not define its height. Presumably given the intended similarities with inline boxes, it's height meant to be identical to what would happen if the ruby container was regular inline box containing all its base level content as inline boxes, but it should be made explicit. Note that the content area of an inline box is itself currently undefined (see the second note in css-inline section 3.3.1), but making sure that these two are identical seems worth stating. Cursory testing seams to support this.

Alternatively, if it is meant to be something else, then that should be stated instead.

Activity

  1. css-meeting-bot commented on Apr 30, 2020

    @css-meeting-bot
    Member

    The CSS Working Group just discussed [css-ruby] define the height of the content area of ruby containers, and agreed to the following:

    • RESOLVED: height of the content area of ruby container box is calculated the same as inline boxes
    The full IRC log of that discussion <Rossen_> Topic: [css-ruby] define the height of the content area of ruby containers
    <Rossen_> github: https://github.com//issues/4936
    <TabAtkins> florian: Around ruby bases and annos, each have base containers and anno containers, and around all of that there's a ruby container. We're talking about that one.
    <TabAtkins> florian: Its content height isn't defined either
    <TabAtkins> florian: A bit subtle, e haven't walked about the various boxes yet. But you can put a bakground on the ruby container and see it's height
    <TabAtkins> florian: In all impls, the answer here is the same as for previous question. They're treated as inlines; background goes behind the base layer and that's it.
    <TabAtkins> florian: Since we'll see in othe rissues that we don't need that box to grow, I'm inclined to match impls.
    <fantasai> sgtm
    <TabAtkins> AmeliaBR: What does that mean?
    <tantek> There's a lot of questions about & undefined aspects about Ruby layout despite there being multiple implementations, perhaps we need tests to see what existing implementations do and whether they've converged or not? Instead of a priori / aspirationally answering the questions of what "should" happen.
    <TabAtkins> fantasai: If a background is on <ruby> itself, it'st he same as a background on a <span> around the ruby
    <TabAtkins> AmeliaBR: Is the anno included?
    <TabAtkins> fantasai: No
    <myles> AmeliaBR++
    <TabAtkins> AmeliaBR: ARe there use-cases for having it cover the anno?
    <TabAtkins> fantasai: Dunno. Backgrounds on ruby in general doesn't appear existent.
    <TabAtkins> fantasai: If you don't care about linebreaking you can get that behavior by setting it to inline-block anyway
    <faceless2_> Styling the <rt> with <rt style="background-color:inherit"> works to give the annotation the same color
    <myles> faceless2_: it's not the same, though. the RT and the RB can have different widths
    <TabAtkins> AmeliaBR: So if you actually want a background that highlights the base and the anno, we're saying that's not possible without giving up fragmentation right now.
    <TabAtkins> florian: You can put a background on both bases and annos.
    <fremy> ^ exactly what I was gonna way
    <TabAtkins> florian: They're contiguous.
    <TabAtkins> AmeliaBR: They're not the same length, are they?
    <TabAtkins> florian: They should be, yes. A little underspecified.
    <TabAtkins> fantasai: Given that the ruby box doesn't really affect layout, I think we should resolve on this; we can reconsider it if anyone asks for it
    <TabAtkins> Rossen_: Objections?
    <florian> RESOLVED: height of the content area of ruby container box is calculated the same as inline boxes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions