Closed Bug 1115249 Opened 10 years ago Closed 10 years ago

Suppress leading added to ruby text container

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: xidorn, Assigned: xidorn)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Per CSS Ruby spec: Each ruby annotation container is sized and positioned to contain exactly the full height of its ruby annotations. I do not fully agree with this spec. I don't think it is necessary to disallow author from applying something like line-height to the containers. But the default behavior we provide should match this spec anyway. It may need more discussion.
Attached patch patch (deleted) — Splinter Review
Assignee: nobody → quanxunzhen
Attachment #8541958 - Flags: review?(dbaron)
Summary: Suppress spacing added to ruby text container → Suppress leadings added to ruby text container
The spec quote is from http://dev.w3.org/csswg/css-ruby/#ruby-layout . The spec repeats the same text for both bases and annotations. Implementing it for base containers (which are more inline-like) would be a *lot* more complicated than this patch, but I think this probably is sufficient to implement it correctly for annotations. I also don't see a good reason to implement it for base containers. (Inlines really have two different concepts of height: the line-height (half-leading added to each side of the font height) is different from the margin/border/padding (also added to each side of the font box).) That makes me wonder whether it's a good idea to implement for annotations.
I think what the spec wants to say for rbc is the font box. I see no reason to suppress the line-height of rbc, either. Maybe we should send an email to the www-style list. Anyway, we have to either implement this, or add "line-height: 0" to ::-moz-ruby-text-container to suppress the leadings the pseudo ruby text containers inherit from its parent. If we do neither of them, the default behavior of pseudo rtc boxes would be annoying for authors. BTW, it would be better to suppress the line-height of inter-annotation whitespaces as well. The spec hasn't said anything about that now, but I think it should come soon.
Any opinion about comment 3?
Flags: needinfo?(dbaron)
It's not clear to me what influence these things (leading, line-height) are even supposed to *have* on ruby annotations. That is, which "top" and which "bottom" should we care about in http://dev.w3.org/csswg/css-ruby/#line-height ? The spec isn't clear. Whether the leading on ruby text even does anything depends on the answer to that. So I wouldn't even worry about this until that is settled.
Flags: needinfo?(dbaron)
Summary: Suppress leadings added to ruby text container → Suppress leading added to ruby text container
Comment on attachment 8541958 [details] [diff] [review] patch Cancelling this review request until the spec is clearer.
Attachment #8541958 - Flags: review?(dbaron)
(In reply to David Baron [:dbaron] (UTC-8) (needinfo? for questions) from comment #6) > Comment on attachment 8541958 [details] [diff] [review] > patch > > Cancelling this review request until the spec is clearer. I think the current spec is clear enough that we'd better apply the same rule to both rbc and rtc that they are sized exactly the full height of their children. I'm going to implement it in bug 1055662. With that, I think we can close this bug now.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: