[css-text] Prevent pre
from inheriting hanging-punctuation by default with a user-agent style rule
#9689
Labels
Closed Accepted by CSSWG Resolution
css-text-4
HTML
Requires coordination with HTML people
Needs Testcase (WPT)
See this post from Tony Mottaz, 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.
The text was updated successfully, but these errors were encountered: