W3C home > Mailing lists > Public > public-css-archive@w3.org > July 2018

Re: [csswg-drafts] [css-inline] need to define interaction of initial-letter and text-align other than start

From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
Date: Tue, 03 Jul 2018 01:24:30 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-401984703-1530581069-sysbot+gh@w3.org>
The Working Group just discussed `initial letter and text-align`, and agreed to the following:

* `RESOLVED: Raised initial is justified as normal.`
* `RESOLVED: For sunk initials, the initial letter box’s start margin edge is anchored to the start edge of the line (after first-line 'text-indent'), and alignment happens afterwards in the remaining space on the line.`
* `RESOLVED: sunken initial letters suppress justification between the initial letter and subsequent text.`

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> Topic: initial letter and text-align<br>
&lt;dbaron> github: https://github.com/w3c/csswg-drafts/issues/884#issuecomment-392114382<br>
&lt;TabAtkins> fantasai: So how does initial-letter interact with text-align?<br>
&lt;TabAtkins> fantasai: proposal is that for raised initials, no special behavior, it just aligns as specified.<br>
&lt;TabAtkins> fantasai: sunk initials, suggestion is that initial-letter box's start margin edge is anchored to start edge of the line, then text-indent works on the rest of th etext on the line. It also suppresses justification between the initial-letter and subsequent text.<br>
&lt;TabAtkins> fantasai: Say you have a bunch of chinese chars and inter-character spacing, you don't want spacing between initial-letter and first normal text letter on first line, but not on subsequent (because they're not "next" to the initial letter).<br>
&lt;TabAtkins> fantasai: So instead they're flush on all lines.<br>
&lt;TabAtkins> dbaron: I'm a little worried about the justification part.<br>
&lt;TabAtkins> dbaron: Thinking about initial letters that are single-letter words, like english "A" or "I". Especially with wide justification, seems like it'll look weird.<br>
&lt;TabAtkins> dbaron: The justification from word spaces seems different than inter-character.<br>
&lt;TabAtkins> fantasai: justification opportunities *form the space* are different than justification arising from the letters. It'll still justify in that case.<br>
&lt;TabAtkins> dbaron: Ah, that wasn't clear. Sounds good, but I want more clarity in that when it's written into the spec.<br>
&lt;TabAtkins> fantasai: So three separate resolutions here.<br>
&lt;florian> I looked into it, I like it. (all 3)<br>
&lt;TabAtkins> fantasai: First, for raised initials, alignment is honored as usual.<br>
&lt;TabAtkins> Rossen: Seems uncontroversial.<br>
&lt;TabAtkins> dauwhe: It's just a big letter.<br>
&lt;TabAtkins> RESOLVED: Raised initial is justified as normal.<br>
&lt;TabAtkins> fantasai: Second is that sunk initials are attached to the start edge of the line, then alignment affects the rest of the line.<br>
&lt;TabAtkins> [myles draws a picture]<br>
&lt;TabAtkins> fantasai: We couldn't come up with anything better than that.<br>
&lt;TabAtkins> florian: We couldn't find any use-cases, we just selected the simplest thing that wasn't horrible.<br>
&lt;TabAtkins> dbaron: Do you ever actually see initial letters that aren't flush against the left edge?<br>
&lt;dbaron> (where the left edge might be a shape rather than a straight edge)<br>
&lt;TabAtkins> dauwhe: I've made some examples where you can set an explicit width on the ::first-letter and then right-align the initial-letter in that block, so the letters themselves aren't flush against the start edge.<br>
&lt;TabAtkins> myles: What were the other options considered?<br>
&lt;TabAtkins> dauwhe: Florian put some suggestions into the issue.<br>
&lt;TabAtkins> florian: That was a long time ago...<br>
&lt;tantek> the example dauwhe mentioned (I thought I heard) http://tantek.com/2015/224/b1/alphabet-indieweb<br>
&lt;dauwhe> tantek: yes :)<br>
&lt;TabAtkins> florian: One of my proposals was - do two steps. 1, do the "attached to start edge, then align rest of text", then 2 flush it with text as much as you can.<br>
&lt;TabAtkins> florian: But that didn't seem good.<br>
&lt;TabAtkins> myles: I could think of a few scenarios, but this is probably best.<br>
&lt;TabAtkins> myles: A third is just lay out first line right-justified, place first letter, then try to place everything else. That sucks.<br>
&lt;TabAtkins> myles: Fourth is make it not sunken, but it's probably more important to honor the sunken request.<br>
&lt;TabAtkins> myles: Uncommon enough we can maybe consider it an error case. Probably not worth doing a two-pass for that.<br>
&lt;TabAtkins> myles: So out of those four options, I think current proposal is best.<br>
&lt;TabAtkins> fantasai: Another is lay out all the lines that are affected start-aligned, then apply alignment to all the lines at once.<br>
&lt;TabAtkins> florian: I think that's what I suggested, the two-pass<br>
&lt;TabAtkins> dbaron: I think it's slightly different.<br>
&lt;TabAtkins> [fantasai draws out their suggestion]<br>
&lt;TabAtkins> dbaron: That's different, but I think florian's is slightly better for right-alignment, while I think fantasai's is bad for right-alignment. Lines won't necessarily be flush.<br>
&lt;TabAtkins> florian: Since we do consider this an error case, I agree we don't need to do either two-pass.<br>
&lt;TabAtkins> myles: [question about diagram fantasai drew]<br>
&lt;TabAtkins> myles: All of these suck.<br>
&lt;TabAtkins> dbaron: You could constrain the later lines to be shorter than the first, but it's a lot of work...<br>
&lt;TabAtkins> myles: I just think this is rare enough that it just won't really matter what we pick.<br>
&lt;TabAtkins> fantasai: I also want to add a note to the spec that we don't expect this to be used, so if you actually need this to work a particular way, let us know.<br>
&lt;TabAtkins> Rossen: This is the current behavior, too.<br>
&lt;TabAtkins> Rossen: Objections?<br>
&lt;fantasai> RESOLVED: For sunk initials, the initial letter box’s start margin edge is anchored to the start edge of the line (after first-line 'text-indent'), and alignment happens afterwards in the remaining space on the line.<br>
&lt;TabAtkins> fantasai: Third part is initial-letter suppresses justification opportunities between the initial-letter and subsequent text. Specifically about between two characters, not about subsequent spacing, or stretchy characters.<br>
&lt;TabAtkins> myles: Doesn't that fall out?<br>
&lt;TabAtkins> fantasai: No, it's considered part of the first line's text.<br>
&lt;TabAtkins> myles: So when you cneter the first line, that text will include the first letter, even tho we just resolved it won't be centered...<br>
&lt;myles> So the first line's width is the full width, and justification/centering includes the width of the first letter, but the second line (when the first letter is sunken) has a shortened line-box, and the centering doesn't include the width of the first-letter inside the calculation<br>
&lt;myles> ?<br>
&lt;myles> fantasai: yes<br>
&lt;TabAtkins> Rossen: Any objections?<br>
&lt;tantek> really hoping to see someone try to implement such details<br>
&lt;TabAtkins> RESOLVED: sunken initial letters suppress justification between the initial letter and subsequent text.<br>

GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/884#issuecomment-401984703 using your GitHub account
Received on Tuesday, 3 July 2018 01:24:33 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 3 July 2018 01:24:34 UTC