- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 24 Apr 2024 16:01:11 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[css-ruby-1] Breaks within implicit bases is not Web-compatible`, and agreed to the following: * `RESOLVED: Style anonymous bases with text-wrap-mode: nowrap as described in https://github.com/w3c/csswg-drafts/issues/10073#issuecomment-1995455391` * `RESOLVED: unresolve previous resolution` <details><summary>The full IRC log of that discussion</summary> <dbaron> fantasai: In suggested UA style sheet, we had rb { white-space: nowrap}. Most ruby bases don't have an rb element for reasons that I disapprove of, but it's where we're at.<br> <dbaron> fantasai: We wanted to allow bases to wrap... so we don't want to forbid wrapping within bases entirely with no way to change it.<br> <dbaron> fantasai: There are different approaches we could take to solve this.<br> <dbaron> fantasai: One is to have the UA apply text-wrap-mode to anonymous... but if we did that author wouldn't be able to allow wrapping.<br> <dbaron> fantasai: We could say anonymous ruby bases have text-wrap-mode: nowrap on them, and if author wants to wrap the base they could use an rb or a span.<br> <dbaron> fantasai: ANother option is to have a pseudo-element for anonymous ruby bases.<br> <dbaron> florian_irc: if a pseudo, then all ruby bases whether anonymous or not<br> <dbaron> fantasai: or that<br> <florian_irc> q+<br> <dbaron> fantasai: Third option, have white-space: normal compute to nowrap on ruby bases and magically inherit that way. So unless you explicitly set it to something else it will be nowrap.<br> <astearns> ack florian_irc<br> <fantasai> florian_irc: I think a pseudo-element would be overkill<br> <fantasai> florian_irc: if just for this use case<br> <fantasai> florian_irc: so first option would make sense<br> <fantasai> florian_irc: but there are other use cases for a ruby base pseudo-element<br> <astearns> ack dbaron<br> <fantasai> florian_irc: so maybe we get one later; but that's complicated so wouldn't start there<br> <fantasai> 1. apply `text-wrap-mode: nowrap` to anonymous bases<br> <fantasai> 2. add a ::ruby-base pseudo-element and apply it that way<br> <fantasai> 3. make `white-space: normal` compute to `nowrap` on ruby bases<br> <emilio> I think that's the simplest approach<br> <fantasai> dbaron: I also lean towards the first proposal<br> <fantasai> dbaron: the one other thought is, I'm concerned about making pseudo-element apply to all ruby bases whether anonymous or not<br> <fantasai> dbaron: as of right now we don't have a pseudo-element that also matches real elements<br> <fantasai> dbaron: there are some proposals that might take us down this path, but it's got some interesting issues and wouldn't want to go down this path without thinking about it carefully first<br> <fantasai> florian_irc: fair neough<br> <fantasai> s/neough/enough/<br> <fantasai> astearns: sounds like we're converging on 1st option<br> <fantasai> astearns: personally concerned about that, because we're dictating styling that you can only change by changing your markup<br> <fantasai> astearns: which seems like the wrong path<br> <fantasai> astearns: should have a way to override the thing we're applying to the anonymous bases<br> <fantasai> astearns: but if ppl want that, we could add the pseudo element<br> <fantasai> florian_irc: that said, you're not changng your markup to something unrelated, if you elide markup you have fewer things to style<br> <dbaron> fantasai: two points:<br> <astearns> ack fantasai<br> <dbaron> fantasai: one, the suggestion about computing text-wrap-mode differently... we'd make text-wrap-mode: normal | wrap | no-wrap<br> <dbaron> fantasai: normal would be the initial value and mean wrap except for a ruby base<br> <dbaron> fantasai: so if you wanted to style it differently you could set text-wrap-mode: wrap on the ruby element<br> <dbaron> fantasai: second, we wouldn't have this problem if html parsers injected rb tags into ruby, which they should have done, and I'm still annoyed about that.<br> <dbaron> florian_irc: is that still fixable?<br> <dbaron> fantasai: I don't know. We'd have to analyze existing content to see what kinds of selectors are being used.<br> <dbaron> fantasai: if people are using child selectors in combination with ruby, those could break<br> <astearns> ack dbaron<br> <dbaron> fantasai: I don't expect people to do that unless they're doing something fancy with rp<br> <fantasai> dbaron: It feels less costly to do a pseudo-element than to do the extra value of text-wrap-mode<br> <emilio> q+<br> <fantasai> dbaron: so given choice between those two, I would lean towards pseudo-element<br> <astearns> ack emilio<br> <fantasai> fantasai: implementation cost aside, agree it's a lower cost to authors, since they only encounter the complication if they're working in ruby (which is highly specialized)<br> <fantasai> emilio: analogy with table parts is good, if you wanted you can just write it<br> <fantasai> fantasai: tables inject tbody even if you don't write it<br> <fantasai> emilio: I mean, if you set 'display: table-cell' on a random element no way to style the table<br> <fantasai> emilio: I agree with styling the anonymous boxes, it's consistent<br> <fantasai> florian_irc: and also it's compatible with extending to introduce a pseudo-element<br> <fantasai> florian_irc: and it's also compatible with fixing the HTML parsing, if we're ever able to do that<br> <fantasai> PROPOSED: Adopt `text-wrap-mode: nowrap` styling to anonymous ruby bases<br> <fantasai> ruby > :not(rb, rbc, rtc, ruby) { text-wrap-mode: nowrap; }<br> <fantasai> fantasai: we'd have to add this rule also, because real elements can't inherit from anonymous<br> <fantasai> dbaron: a bit concerned about that selector because it looks expensive from perf perspective ... unsure for current engines<br> <fantasai> dbaron: idk if will require parent of every element<br> <emilio> q+<br> <astearns> ack fantasai<br> <fantasai> emilio: that rule is not great<br> <fantasai> RESOLVED: Style anonymous bases with text-wrap-mode: nowrap as described in https://github.com/w3c/csswg-drafts/issues/10073#issuecomment-1995455391<br> <dbaron> (I'm a little worried the 2 things are tied together and we may need to reconsider.)<br> <fantasai> emilio: regarding performance, it's probably not as terrible as it used to be, but only probablistic filtering<br> <fantasai> emilio: overall I don't think it's great<br> <fantasai> emilio: can we set nowrap on the ruby element itself?<br> <fantasai> fantasai: ruby itself needs to be able to wrap<br> <fantasai> emilio: can we explicitly list stuff?<br> <fantasai> florian_irc: all possible inline elements?<br> <fantasai> astearns: can it be magic?<br> <fantasai> emilio: not really great...<br> <fantasai> astearns: ok, out of time. Can either leave open or resolve to add it and then work through the perf concerns.<br> <fantasai> astearns: what's the preference?<br> <fantasai> dbaron: lean towards leaving it open<br> <fantasai> RESOLVED: unresolve previous resolution<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10073#issuecomment-2075297324 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 24 April 2024 16:01:12 UTC