4 ms·
this seems like something that should be left to end users to come up with a solution for. I would guess that a large percentage of web designers don't even kno
by 2h 4y ago
this seems like something that should be left to end users to come up with a solution for. I would guess that a large percentage of web designers don't even know what this is, so adding it to the spec itself is just further bloating an already bloated spec.
one thing I like about the Go language team, is they are not afraid to say "no" to proposals. it seems W3 forgot this tactic, long, long ago, and just rubber stamp anything coming from the Chrome team. Sad.
- cmdialog 4y agoJust stay in the back-end. Then you don't have to deal with these problems. Seems like you are having an opinion on an issue that doesn't really concern you for a reason that I can't seem to identify. Would you care to elaborate on why you care about the CSS typography spec?
- 2h 4y agothanks for your comment. I will make sure to never comment on a thread again, unless I am a world expert on the subject.
- creativenolo 4y agoAny web designer who has studied the minimum amount of typography would know this. And near every graphic designer know this. Near no web designers or graphic designers do this on the web, because they can’t. One persons bloat is another fundamentals.
- CJefferson 4y agoHow could end users reasonably solve this? You can’t know exactly how text will be laid out, so I can only imagine using… canvas and doing your own font rendering? Which sounds horrible for all number of reasons.
- ravenstine 4y agoMore importantly, why should they? I mean, yeah, I guess giving end users that level of control is a good thing, just like how they can decide the default font style of their browser. But it's not the user's job to fix your web page. How text is rendered on a page is a result of intention. The web developer should be able to implement the design intent of a body of text and either allow it to widow where it makes sense or force the text to balance. The problem is that the tool for that simply doesn't exist without some JavaScript foolery, not that the user can't toggle something to make it happen. > so I can only imagine using… canvas and doing your own font rendering? Which sounds horrible for all number of reasons. It's both horrible and not. Canvas can be used merely to make appropriate calculations for text given that it is aware of the size of any font it is using. Rather than rendering with a canvas directly, it could be used to efficiently determine what the width of an element containing text should be to make it "balanced", and maybe where to stick `<br>`. This has basically nothing specifically to do with widowing, but I once implemented the approach of using canvas to do calculations for actual page text. The goal was to make it so that a given text would always fit the size of its containing element no matter how long the text. In other words, if the container has a fixed height and width, like if you wanted for whatever reason to render the Declaration Of Independence in a 300x300 div, it will find the correct font size to squeeze that whole thing into that div. https://codepen.io/Ravenstine/pen/QdRYeq https://codepen.io/Ravenstine/pen/QdRYeq Of course it will get slower the more text it has to calculate. Kinda tempted to see if WASM speeds it up any. I think it's a poor idea to try to polyfill text balancing in that way, but I think it can be done and in a way that doesn't sacrifice rendering actual text. EDIT: I realized I contradicted myself.
- deleted 4y ago[deleted]
- 2h 4y agoIts not my problem to solve, that's the whole point. Its a niche enough need that it shouldn't even be part of CSS. people who have a need for it, should figure out some solution on their own, not force their complication onto the entire spec itself.
- karlshea 4y agoThis isn’t niche at all, this has been a problem on many of the sites I’ve worked on. And the comment above is right, this is a rendering engine issue, there’s not really much you can do as an end-user.
- robertoandred 4y agoThis can't be solved well by the "end user", since it'd have to be done after the page loads.
- frosted-flakes 4y agoAny web designer with any degree of training in typography and text layout will recognize this as a problem. It's just that there's almost nothing we could do about it without CSS support, so everyone was forced to simply accept it.