[csswg-drafts] [css-text] Prevent `pre` from inheriting hanging-punctuation by default with a user-agent style rule (#9689)

AmeliaBR has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-text] Prevent `pre` from inheriting hanging-punctuation by default with a user-agent style rule ==
See [this post from Tony Mottaz](https://www.tonymottaz.com/blog/oh-no-my-json/), where there is currently non-interoperable behaviour about whether `hanging-punctuation` styles inherit into pre-formatted text blocks.

I would recommend adding `pre { hanging-punctuation: none; }` to the user agent stylesheet (assuming the HTML folks are OK with that). Authors can override if they need to, but I think the more common situation is to want to add typographic niceties to body text but keep text columns neatly monospaced for pre-formatted blocks!

Another option (and this may be how other browsers have implemented it) is to make hanging-punctuation have no effect in a preserved whitespace context. But that removes the author choice.

Either way, the sooner this change is made, the better, just in case there's anyone out there who *does* like their code braces hanging off the sides of their code block & they get used to the current behaviour.


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9689 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 8 December 2023 23:24:24 UTC