- From: Xiaocheng Hu via GitHub <sysbot+gh@w3.org>
- Date: Tue, 01 Oct 2024 20:17:13 +0000
- To: public-css-archive@w3.org
Not the ideal solution, but you can simulate it by interleaving no-break spaces and zero-width spaces: ``` foo​ ​ ​bar ``` On Sat, Sep 7, 2024 at 5:14 PM Douglas Parker ***@***.***> wrote: > Rather than pre, you probably want pre-wrap, and possibly combine it with > white-space-trim. > Do you mean that you want some sequences of spaces to collapse, but not > others? Why not just preserve all spaces and use a single one instead of > multiple wherever you want to see a single one? > > Preserving all spaces in an element is a larger change than strictly > necessary to preserve only a particular set of spaces within it and forces > the developer to compromise other aspects of how they write their HTML, > such as eliminating any indentation or newlines depending on the specific > white-space value they are using and the trade offs that requires. &ncsp; > would not require developers to make that kind of compromise. They could > use any white-space value and just choose to keep any arbitrary space > within the element. > > Also as mentioned, CMS tools generally can't rely on any specific styles > being applied to an element, so any CSS requirement feels like a > non-starter for that use case. > > maybe I'm one of those people who insists on two spaces at the end of > every sentence > And you want to see both or one? > > In this example, I would want to see both spaces. If the developer types Good > new everyone! HTML supports non-collapsible spaces now. (note two spaces) > they will naturally be collapsed into a single space when rendered in HTML. > &ncsp;&ncsp; would allow both spaces to be preserved, regardless of the > rest of the content or styling for that element. > > Yeah, see whatwg/html#5121 <https://github.com/whatwg/html/issues/5121> > and whatwg/html#7071 <https://github.com/whatwg/html/pull/7071> for > instance. > > Thanks for pointing that out, I wasn't aware new HTML entities were so > difficult to add > <https://github.com/whatwg/html/blob/main/FAQ.md#html-should-add-more-named-character-references>. > I agree this is unlikely to meet the impact needed to justify its addition. > An unnamed entity could technically address the same purpose, though I > imagine it would be significantly harder to convince the community to > prefer an unnamed &ncsp; character over for those mis-use cases. > > It seems I was at least correct that this would require a new Unicode > character, but it sounds like it would make more sense to file this in > https://github.com/whatwg/html? I imagine we'd need at least some amount > of consensus there among HTML stakeholders that this is worth pursing > before there would be any hope of getting Unicode on board. > > — > Reply to this email directly, view it on GitHub > <https://github.com/w3c/csswg-drafts/issues/10821#issuecomment-2336454029>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AET4OW5KSZXXZ66F4J2RHT3ZVNUCRAVCNFSM6AAAAABNQ5OWXKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZWGQ2TIMBSHE> > . > You are receiving this because you are subscribed to this thread.Message > ID: ***@***.***> > -- GitHub Notification of comment by xiaochengh Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10821#issuecomment-2386987747 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 1 October 2024 20:17:15 UTC