[css-ruby] ruby-merge:merge and long annotations
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- PR merge metrics
- PR metrics pending
Description
I think the expected behavior of ruby-merge:merge is reasonably clear when the measure of the (merged) annotations is shorter than the measure of the corresponding bases, but not in the opposite situation.
The relevant spec sections are https://drafts.csswg.org/css-ruby-1/#ruby-layout and https://drafts.csswg.org/css-ruby-1/#collapsed-ruby
Let's explore that with ASCII art.
First, just to get used to the space distribution algorithms and how my diagrams work, here are a few non problematic cases:
separate / non spanning:
|[ a1 ]|[ a2 ]|[annotation-3]| <- uses ruby-align on each annotation
|[Base 1]|[Base 2]|[ Base 3 ]| <- uses ruby-align on each base
Spanning (short):
|[ a1 ]|[ short span ]| <- uses ruby-align on each annotation
|[Base 1]|[Base 2]|[Base 3]| <- no extra space, nothing to align
Merged (short):
|[ merged annotation ]| <- uses ruby-align on the annotation container
|[Base 1]|[Base 2]|[Base 3]| <- no extra space, nothing to align
Spanning (long):
|[ a1 ]|[spanning annotation]| <- uses ruby-align on each annotation (no extra space in spanner)
|[Base 1]|[ Base 2 ]|[ Base 3 ]| <- uses ruby-align on each base, extra space divided to columns
Now, here's the tricky bit. Merged (long):
|[This is a long merged annotation]| <- no extra space, nothing to align
|[ Base 1 ]|[ Base 2 ]|[ Base 3 ]| <- uses ruby-align on each base like for a spanner?
?or maybe?
|[ Base 1 Base 2 Base 3 ]| <- treats the bases as merged as well?
The key question is whether 'ruby-merge' should apply to base container or just to annotations. If it does apply to the base container, you can switch between these two variants manually. If it does not, we need to decide which of the two you get. The second variant seems more desirable, but what do you do if there are multiple annotation levels? Merge if any of them is merge? Merge if all of them are merge?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the CSS Ruby specification sections on ruby layout and collapsed ruby linked in the issue. Work through the ASCII-art cases to determine how ruby-merge applies when annotations are longer than their bases, including multiple annotation levels. Done means the specification clearly defines the expected layout and merge behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100