News for hackers. Stuff that matters.
Re:The `hanging-punctuation property` in CSS by chrismorgan on Tuesday November 28, 2023 @04:54AM (#38444155)
CSS specs are explicitly not interested in prescribing TeX-level control; text-wrap-style is a good example of this: it’s just hints, with the actual algorithms completely UA-defined. And in fact, they’re going out of their way to recommend including multiple distinct heuristics of prettiness, so that developers don’t use it as a proxy for just one thing and start relying on something that is explicitly and deliberately undefined. <https://github.com/w3ctag/design-reviews/issues/864#issuecom...> (And Chromium has done just this: <https://bugs.chromium.org/p/chromium/issues/detail?id=143279...>.)

In other words: you’ve already lost!

Re:The `hanging-punctuation property` in CSS by p4bl0 on Tuesday November 28, 2023 @05:08AM (#38444231)
I understand this, but let's be more concrete: when you use CSS to design for print (that is, in general, to produce a PDF), you are using a specific implementation (e.g., Firefox will be used to produce the final PDF from your HTML and CSS, or Inkscape will be from your SVG and CSS). Given an implementation, you get a determined rendering, and it is this specific one that you need to be able to tweak to your needs. Same goes for application UI design: a given GUI framework comes with its own implementation of CSS rendering and it is its specific output that developers (or rather, theme designers) need to be able to have precise control over. In both cases, even if the standard does not precisely states what property values must give what rendering, you get something using the tools you have and you may want to tweak details to your taste using those same tools (even if only by trial and "error", but for that you need the option to fine tune the properties you want to play with).

Again, I'm not saying CSS is coherent nor that this is a good thing in the absolute sense, as I already said, I agree with your feeling, I'm just saying that I understand where the need of more precise control/tweaking over details that is sometime in the standard comes from.

Re:The `hanging-punctuation property` in CSS by chrismorgan on Tuesday November 28, 2023 @05:10AM (#38444246)
You’re abusing CSS.

(Can’t say I never have…)

Re:The `hanging-punctuation property` in CSS by p4bl0 on Tuesday November 28, 2023 @05:14AM (#38444267)
Well I'm not, but some people are, probably. The need exists. That's my whole point :).
Re:The `hanging-punctuation property` in CSS by jjgreen on Tuesday November 28, 2023 @07:39AM (#38445052)
HTML tables for layout FTW.
Re:The `hanging-punctuation property` in CSS by gazook89 on Tuesday November 28, 2023 @09:28AM (#38446056)
One example that I contribute to: https://homebrewery.naturalcrit.com

It is a code mirror app that outputs md styled like dnd books. It’s very much a “round peg in square hole” project, using html/css to create print materials, but for many it is good enough. It is just html and css, and allows customization, and precise styling requires precise css properties.

As you noted, it does only work well in one browser, Chrome on desktop (even though I think all the devs use FF as their daily driver). But as another commenter noted, the answer is that you design on one machine and share via pdf.

Re:The `hanging-punctuation property` in CSS by eropple on Tuesday November 28, 2023 @09:32AM (#38446100)
This is ridiculously well-done. Thanks for sharing.
Re:The `hanging-punctuation property` in CSS by DemocracyFTW2 on Tuesday November 28, 2023 @03:14PM (#38450631)
> You’re abusing CSS.

In the spirit of "not a bug but a feature" I'd say they use is demonstrating the "full potential" of CSS...

Re:The `hanging-punctuation property` in CSS by postmodest on Tuesday November 28, 2023 @10:22AM (#38446638)
Part of the perversion is that web standards demand "more than one implementation" (see WebSQL) so if we did the same thing and just "put TeX in the layout pipeline" that would get punted faster than SQLite was.

Text layouts being undefined is the last great tragedy of HTML, and we should fix it.