- From: Douglas Parker via GitHub <sysbot+gh@w3.org>
- Date: Sat, 07 Sep 2024 21:13:54 +0000
- To: public-css-archive@w3.org
> 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 https://github.com/whatwg/html/issues/5121 and 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. -- GitHub Notification of comment by dgp1130 Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10821#issuecomment-2336454029 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Saturday, 7 September 2024 21:13:55 UTC