- From: Roman Komarov via GitHub <noreply@w3.org>
- Date: Thu, 10 Jul 2025 08:04:01 +0000
- To: public-css-archive@w3.org
I will need to play with the current implementation of `hanging-punctuation` in Safari a bit more, but the last time I remember looking at it, it (and the current spec) never satisfied what I usually wanted from the hanging punctuation. The current values in the spec can be difficult to understand for authors: why do `force-end` and `allow-end` only include stops or commas? And as authors, we _need_ control over specific characters individually, including different values for how much they hang, etc. But I can see us first shipping a simplified version of `hanging-punctuation`, and then working out an extended version that will do things _right_. > I'll be very nervous to ship a different behavior from Safari when it has been shipping it for 10 years. I am not sure a change in behavior will break much, and it might even fix some cases. Plus, the worst a change could do is move some punctuation character into the overflow area and trigger overflow, which is unlikely to lead to lost content, so it might be safe-ish to do. But, of course, it would be great to estimate how often it would trigger with use counters and see if there are any really breaking cases. Also, looking at the current Safari implementation for [this example](https://jsbin.com/heluxos/edit?html,output), it does not behave how I would expect it with `text-align` different from `left`: <img width="502" height="388" alt="Screenshot of a hanging-punctuation demo with right-aligned text, where the quotation symbols do not hang until they overflow." src="https://github.com/user-attachments/assets/e873245f-1c38-4680-ae71-9c35f679cfb8" /> <img width="502" height="388" alt="Screenshot of a hanging-punctuation demo with center-aligned text, where things look uneven and not centered" src="https://github.com/user-attachments/assets/75cc8931-534b-4452-af6e-860229b5b17b" /> These examples show that, yes, Safari treats `last` conditionally, which results in an unexpected rendering: - For right-aligned text, I would expect all the quotation symbols on the right to hang. - For center-aligned text, I would expect the space on the left and right to be distributed evenly. Given the specs allow using `allow-end` and `force-end` for this case, what if those could clarify how the `first` and `last` should behave at different alignments as well? By default I would expect them to behave like `force-end`, but I can see cases where you could want them to be less strict. I would always prefer more options than not. -- GitHub Notification of comment by kizu Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12433#issuecomment-3056201202 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 10 July 2025 08:04:01 UTC