Re: [csswg-drafts] [css-pseudo-4] ::first-letter should include space separators (#5154)

The CSS Working Group just discussed `Should ::first-letter include space separator?`, and agreed to the following:

* `RESOLVED: Spaces separating punct from first letter dont' stop ::first-letter`

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> Topic: Should ::first-letter include space separator?<br>
&lt;Rossen_> github:<br>
&lt;TabAtkins> astearns: We got the examples tantek was asking for<br>
&lt;TabAtkins> astearns: For Norwegian and the other language [French, I think], it makes sense to add those space separators, since they're in the markup<br>
&lt;TabAtkins> astearns: A little afraid of turning it on for other langs, becuase if you have an open-quote and capital letter, and all you want is the quote itself, maybe people are adding spaces to create the separation currently?<br>
&lt;TabAtkins> florian: I think dauwhe said they were inserting spaces to adjust visual separation for English content, so they would want the space included.<br>
&lt;TabAtkins> tantek: I tried to do a little more research as well.<br>
&lt;TabAtkins> tantek: Didn't have time to upload<br>
&lt;TabAtkins> [shows Elements of Typographic STyle]<br>
&lt;TabAtkins> tantek: ON p64, there's some first-letter effects with leading punct, including with guillarmes<br>
&lt;TabAtkins> tantek: So the point I'm making here is that it's not the entire thing is the first letter, it's that the punctuation is skipped over, only the letter is embiggened, then the punct is situated next to it.<br>
&lt;TabAtkins> tantek: So I'm concerned we might be doing the wrong thing.<br>
&lt;TabAtkins> astearns: There's a separate issue addressing that layout, and the current suggestion to get that addressed requires the punct to be part of the ::first-letter<br>
&lt;AmeliaBR> q+<br>
&lt;TabAtkins> tantek: Ok [shows an example in English too]. Maybe we should consider these issues together.<br>
&lt;fantasai> It's issue 2040<br>
&lt;TabAtkins> astearns: I'll drop it in the minutes.<br>
&lt;Rossen_> ack fantasai<br>
&lt;TabAtkins> fantasai: So this is about whether we include the space *when* there is a quotation mark, not about the quotation mark itself.<br>
&lt;TabAtkins> fantasai: If we want French and English to be the same, we need to include it.<br>
&lt;astearns> there is also for changing size of components of initial-letter<br>
&lt;TabAtkins> fantasai: As astearns said, 2040 is about the formatting question if you want the punct and letter different.<br>
&lt;tantek> q?<br>
&lt;TabAtkins> fantasai: Richard said we didn't need to include U+0020 space, becuase the spaces used here are typically other spaces, not the standard word separator.<br>
&lt;florian> q+ to comment on U+0020<br>
&lt;TabAtkins> fantasai: So if we're really concerned, we cna exclude u+0020 and only include the other spaces.<br>
&lt;TabAtkins> fantasai: And note that the punct by itself wont' be picked up as a ::first-letter anyway; you need a letter.<br>
&lt;TabAtkins> AmeliaBR: I'm not sure about ignoring u+0020, lots of people will type this with a stadnard space<br>
&lt;Rossen_> ack AmeliaBR<br>
&lt;TabAtkins> AmeliaBR: But probably the more exotic spaces can be ignored.<br>
&lt;TabAtkins> AmeliaBR: The one common thing from tantek's examples, and some in the issue, where the initial punct is different than the letter, they all have the letter as big. So to do that, we at least need the characters up to the letter to be included.<br>
&lt;chris_> rrsagent, here<br>
&lt;RRSAgent> See<br>
&lt;fantasai> Anyone who's fussy about typography will use the correct space, I think :)<br>
&lt;TabAtkins> AmeliaBR: If we dont' come up with a special solution for people who want the punct to be offset or smaller, there's always the option of people including spans to mark off certain characters.<br>
&lt;Rossen_> ack florian<br>
&lt;Zakim> florian, you wanted to comment on U+0020<br>
&lt;tantek> if I paste this here does it work?<br>
&lt;TabAtkins> florian: Good guides about typography will say to use various spaces, but most people dont' know how to type those.<br>
&lt;astearns> I think we should allow the regular space, even though I'm fussy about typography<br>
&lt;TabAtkins> florian: At least in French, it's pretty common to say ordinary spaces, probably same in Norwegian. So I'd include standard space.<br>
&lt;Rossen_> q?<br>
&lt;TabAtkins> tantek: My concern is that if we just flip this on, we'll cause pages that have not been tested with this to suddenly have first-letters that didn't before.<br>
&lt;TabAtkins> tantek: And end up with big punctuation as well as big letters.<br>
&lt;TabAtkins> tantek: That might come as a surprise to authors who are used to not doing that automatically.<br>
&lt;TabAtkins> tantek: And I'm not sure it's the right default.<br>
&lt;TabAtkins> tantek: So if it is punct-space-letter, maybe the letter itself should be the only thing included as the ::first-letter, and the pucnt gets normal inline styling.<br>
&lt;TabAtkins> tantek: That would look closer tothe typography examples.<br>
&lt;florian> q+<br>
&lt;TabAtkins> tantek: I'm concerned we have yet another place where we do the wrong thing typographically by default.<br>
&lt;TabAtkins> tantek: The web has a tradition of this, liek the way large text messes up the line rhythm.<br>
&lt;chris_> so now we need a term for "the characters before the first actual letter"?<br>
&lt;TabAtkins> tantek: So I'm concerned if we add one more papercut.<br>
&lt;fantasai> chris_, we need a pseudo-element, yes :)<br>
&lt;TabAtkins> q+<br>
&lt;TabAtkins> tantek: 5154 shows what browsers are currently doing<br>
&lt;TabAtkins> tantek: There's an example with th eleading quote... [missed]<br>
&lt;Rossen_> ack fantasai<br>
&lt;TabAtkins> fantasai: I think tantek is getting caught up in the not-perfect<br>
&lt;astearns> in the examples provided for this issue, the punctuation *does* take the same styling as the letter:<br>
&lt;chris_> ::first-letter-before<br>
&lt;TabAtkins> fantasai: I think you're forgetting that English and French punct have the same problem and have to be treated the same way<br>
&lt;Rossen_> ack florian<br>
&lt;TabAtkins> fantasai: We need to include the space to keep these on-par, and having them be inconsistent is bad<br>
&lt;TabAtkins> florian: Having ::firs-tletter select the letter and not the preceding punct seems bad, it's already complicated, sounds scary.<br>
&lt;fantasai> s/bad/bad and doesn't solve those problems anyway/<br>
&lt;TabAtkins> florian: As to compat, Safari does it already. So there's some amount of content out there probably already depending on it.<br>
&lt;TabAtkins> florian: So in this example we actually do want the included thing to be large.<br>
&lt;TabAtkins> florian: In other cases we wont' want the punct large, but those apply equally to the exisdting punct-letter without space.<br>
&lt;fantasai> TabAtkins: Florian touched on it at the end, one of the big concerns Tantek brought up<br>
&lt;fantasai> TabAtkins: is wanting to address differently-sized punctuation wrt first-letter<br>
&lt;fantasai> TabAtkins: But that's already the case. If there's no space, we already have that problem, already have to solve it.<br>
&lt;fantasai> TabAtkins: It's not relevant to this issue.<br>
&lt;Rossen_> ack TabAtkins<br>
&lt;TabAtkins> Rossen_: So I think there were several reasons for ahving this, including some existing shipping impls<br>
&lt;TabAtkins> Rossen_: So it's probably not a compat risk, or at least not a big one.<br>
&lt;tantek> q+<br>
&lt;Rossen_> ack tantek<br>
&lt;TabAtkins> tantek: I don't actuallys ee the Safari example as proof of no compat problem<br>
&lt;TabAtkins> tantek: Safari applies all th epunct as well.<br>
&lt;TabAtkins> tantek: It wouldn't surprise me if there's special-casing going on here, looks like impl by accident.<br>
&lt;TabAtkins> tantek: Looking at an example with a massive preceding dash.<br>
&lt;TabAtkins> tantek: It woudlnt' surprise me if people are already not giving that styling to Safari to avoid that problem.<br>
&lt;TabAtkins> astearns: Also in CHrome<br>
&lt;AmeliaBR> Slight tangent, but while testing I discovered that browsers treat quotes in the markup different from quotes inserted via `::before { content: open-quote }`. Is that expected, or just part of all the bugs?<br>
&lt;TabAtkins> tantek: Ok. So that's a bug, and I dont' thinkw e should be designing based on a bug.<br>
&lt;Rossen_> q<br>
&lt;TabAtkins> florian: We're not saying it's a bug, we're saying it's desirable.<br>
&lt;TabAtkins> tantek: I'm talking justa bout the hyphen.<br>
&lt;TabAtkins> tantek: Because of that I think authors might be picking different techniques. So maybe we dont' have a compat problem at all then, because nobody's using it.<br>
&lt;TabAtkins> florian: If there is a real compat problem we'll find tou and revisit<br>
&lt;TabAtkins> faceless2: The big hyphen was actually a desired effect<br>
&lt;florian> s/tou/out/<br>
&lt;TabAtkins> tantek: I'm convinced by the examples, we shoudl do this, but we should make it dependent on solving 2040<br>
&lt;TabAtkins> tantek: That would be my compromise proposal<br>
&lt;TabAtkins> tantek: I think this group can solve that.<br>
&lt;TabAtkins> fantasai: We need to do one thing at a time. These are two separate features that happen to work together.<br>
&lt;TabAtkins> fantasai: So let's just get opening quotes working the same between langs.<br>
&lt;TabAtkins> tantek: They're both ::first-letter<br>
&lt;TabAtkins> [back and forth]<br>
&lt;Rossen_> q?<br>
&lt;astearns> +1 to resolving on this now<br>
&lt;fantasai> TabAtkins: Today, a single quote and no space, will be combined together.<br>
&lt;fantasai> TabAtkins: and the quote won't be sized "correctly" in that case either.<br>
&lt;TabAtkins> Rossen_: Okay, so it sounds like people are all okay with the proposal as it exists. Tantek, you had an objection based on no examples; we now have those. Do you still object?<br>
&lt;TabAtkins> tantek: I strongly prefer that we make this resolution dependent on 2040, but I won't object.<br>
&lt;TabAtkins> Rossen_: So any objections?<br>
&lt;TabAtkins> RESOLVED: Spaces separating punct from first letter dont' stop ::first-letter<br>

GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at using your GitHub account

Sent via github-notify-ml as configured in

Received on Friday, 31 July 2020 14:34:22 UTC