- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Thu, 06 Aug 2020 00:01:00 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[css-pseudo] Problems with styling ::first-letter with punctuation`. <details><summary>The full IRC log of that discussion</summary> <dael> Topic: [css-pseudo] Problems with styling ::first-letter with punctuation<br> <dael> github: https://github.com/w3c/csswg-drafts/issues/2040<br> <dael> Rossen_: Linked to a lengthier topic from the F2F<br> <dael> fantasai: As I'm sure many of you saw during F2F when debating drop-caps typical way to present punct like opening quote is style with different font and styling that's closer to paragraph rather than initial-letter<br> <dael> fantasai: Not always the same as paragraph. Positioned in relation to initial-letter<br> <dael> fantasai: Super common and a problem for people trying to use drop-caps.<br> <dael> fantasai: A number of issues surrounding this aspect. Some are about hanging punct, but also being able to select it.<br> <dael> fantasai: Prop is we add a pseudo-element.<br> <dael> fantasai: Two prop one is first-punctuation and the other is ::puntuation pseudo class attached to first-letter<br> <myles> q+ to ask if ::punctuation would apply outside of ::first-letter<br> <dael> fantasai: You can have multi-characters but you can't have them in the middle b/c only one letter<br> <Rossen_> ack myles<br> <Zakim> myles, you wanted to ask if ::punctuation would apply outside of ::first-letter<br> <dael> myles: Would ::punctuation apply outside of ::first-letter?<br> <fantasai> ::first-letter::punctuation<br> <dael> fantasai: I think that would be bad. I think it would be required to be attached to first-letter. You could write ^ but anything else invalid.<br> <dael> AmeliaBR: I don't want to get into compleixyt of general punct pseudo element. THis is parts of first-letter other than letter.<br> <dael> myles: Sounds like name is bad<br> <dael> fantasai: It's selecting punctuation<br> <myles> s/like name/like the name "punctuation"/<br> <dael> fantasai: Once concern I have with that approach is in many cases the special style you want is only punct before but not after. There's the one in plinss comment. The em-dash in opening quote would be styled vertically middle to the L but the quote would not read properly there.<br> <dael> fantasai: If doing special alignment you only want leading but not trailing.<br> <dael> florian: Is it not included in first-letter pseudo?<br> <fantasai> –«L'<br> <dael> fantasai: It is. All the punct in plinss comment is in first-letter pseudo<br> <AmeliaBR> In “I'm here.”, the “I' are all part of ::first-letter<br> <dael> fantasai: You have ^ sequence. If we have ::punctuation it doens't make sense for the first 2 to be selected but not the last, but you do need to be able to select them separately<br> <dael> AmeliaBR: Visual examples I've seen it's only the bits before styled differently<br> <dael> AmeliaBR: Probably okay at this point to focus on that part. If we see examples to style the after different we can handle it<br> <dael> florian: I think we've seen some<br> <dael> AmeliaBR: We need to distinguish them b/c styles not the same<br> <dael> AmeliaBR: first-letter before-the-letter<br> <dael> plinss: My prop was apply pseudo classes to those pseudo elements<br> <dael> florian: So it selects a run and you can do first-of-type and last-of-tyme<br> <dael> plinss: "L' you have two punctuation pseudo elements<br> <dael> florian: em-dash " letter punct do you get 2?<br> <dael> plinss: That was a question in my comment. Several ways of doing it. If there's spce def multiple pseudo elements. If no space don't know<br> <dael> fantasai: An entire sequence of punct incl the space might be single unit. Flexible with U20 but not other space<br> <dael> plinss: Looking for use cases with em-dash and quote do you want to style different<br> <fantasai> https://github.com/w3c/csswg-drafts/issues/5154#issuecomment-659129316<br> <dael> fantasai: Yes, there was an example ^<br> <dael> plinss: THen different punct pseudo elements<br> <dael> fantasai: em-dash and opening quote look same and following different<br> <dael> plinss: Is there a use case to style differently?<br> <dael> fantasai: I think that low level we say you should put markup. We should do common case and opening punct being adjusted is common. multi opening punct styled independently might not be common enough for support<br> <dael> plinss: If you wrap punct in a span they're all in ::first-letter<br> <dael> fantasai: Insied of them<br> <dael> fantasai: The people who want to style multi leading punct differently is a very small case. I think when you have the case you markup special without first-letter.<br> <dael> florian: Concern with impl complexity. If we go character by character the pseudo will be tree abiding but if we grab a bunch it's not always. first-letter is already a mess so manybe not worse, but might be adding<br> <dael> myles: Why can't ask authors to surround punct with spans? This is getting complex, can't we get authors to do it explicitly?<br> <Rossen_> q<br> <dael> fantasai: Once you do that you can't use first-letter. Also, this is a common case. If it was unusal I'd say put a bunch of spans. General case of opening punct being different is part of basic drop cap styling. If we want drop cap to be usable we'll need to support it.<br> <dael> florian: A run of punct in punct pseudo and you can get 2 of them is good enough for general use case and if you want more complex you pile in spans. I do wonder about impl complexity<br> <heycam> +1 to the complexity concerns around having the run of punctuation, since it will be non-tree-abiding<br> <fantasai> s/of spans/of spans, hope that implementers support initial-letter styling on arbitrary spans soon/<br> <dael> fantasai: I don't have strong opinion of individual or a run. If they are wrap independently will they be kerned together? If it breaks kerning it's a problem. If no doesn't matter much<br> <dael> florian: If independent we need to get spaces in pseudo<br> <dael> fantasai: Yeah<br> <dael> myles: webkit breaks kerning between elements and we view that as a bug. We shouldn't assume different pseudo elements break kerning<br> <heycam> I am wondering whether the kinds of styles authors want to apply to the punctuation is limited enough that we should handle this with a property rather than more pseudos<br> <dael> fantasai: What if you have 2 elements side by side. Normally no styling, but give both vertical-align:super will they continue to be a single line? part of problem here is aligning differently here.<br> <heycam> (for the common cases we want to support)<br> <fantasai> heycam, I don't think it is... because they want to tweak the font (family, size, and color)<br> <fantasai> as well as vertical aligment<br> <dael> florian: Could we do a simplification here? In case of what to style run of punct together you're not having span boundries in the middle. Maybe could make that a tree abiding run?<br> <dael> fantasai: Yes, could work. Hvae allownces in first-letter if it breaks browser not required to do first-letter. We could do that<br> <dael> florian: Yeah, browser could do a weird thing that crosses boundary.<br> <dael> fantasai: Making it tree abiding should be completely possible<br> <dael> fantasai: So how do we select? punct selector punct selector attached to first-letter?<br> <dael> florian: Can you use first child or first of type?<br> <Rossen_> q?<br> <heycam> random wondering: will this pseudo match quotes inserted with the quotes property?<br> <dael> AmeliaBR: I don't think anything else with first-child on pseudo elements<br> <dael> myles: I think we're designing a new feature. Surely that's outside a call.<br> <myles> s/that's/that should be done/<br> <dael> AmeliaBR: Yeah. Probably back to issue. Whatever we do it must be tree abiding is one resolution<br> <dael> plinss: Was a prop for pseudo classes applying to pseudo elements<br> <dael> Rossen_: I think we went 360 around plinss suggestion. Most was restating how we arrive here.<br> <dael> Rossen_: Do we have any reasons why ::first-letter punctuation should have effect outside of first-letter? If not reduces choices quite a bit and it comes down to how do we allow pseudo class only on first-letter<br> <dael> plinss: One of the reasons why switching to ::punctuation we may want to allow in other cases like inside of marker, though not everything<br> <dael> fantasai: 1.3.4 it selects to period?<br> <dael> plinss: Maybe. We can look in the future. Why I'm suggesting a more generic name.<br> <dael> AmeliaBR: IN that case need to distinguish between before or after main thing. Still needs a modifier on punctuation pseudo element. If that's different name or combining pseudo classes we have to design that.<br> <dael> plinss: Ulterior motive to push pseudo classes<br> <dael> Rossen_: It's top of hour and we're not ready to resolve. We can continue next week if we're closer.<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2040#issuecomment-669605615 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 6 August 2020 00:01:03 UTC