- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Tue, 23 Oct 2018 16:11:47 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `Leading Control`. <details><summary>The full IRC log of that discussion</summary> <fantasai> Topic: Leading Control<br> <fantasai> github: https://github.com/w3c/csswg-drafts/issues/3240<br> <mstange> fantasai: On that page you see some diagrams that Jan and Niklas sent me.<br> <mstange> fantasai: The problem we have in CSS that is driving a lot of typesetting people crazy is that we have above and below for text content, and it's very difficult to line up the text with other elements.<br> <mstange> ... You basically have to figure out how much space there is and use a negative margin. This is not a very robust system for achieving alignment.<br> <mstange> ... We need the ability to strip out the top part of the line box that is above the text, so that you only have leading between the lines but not above the first or below the last line.<br> <mstange> ... You also need to be able to strip out the half leading, which comes on top of the ascent, which is some arbitrary number that the font author put in that might not have much to do with anything.<br> <mstange> ... For different writing systems you want to use different metrics here.<br> <mstange> ... We need to strip it down to one particular font metric.<br> <astearns> didn't we talk about a first-baseline-offset property at some point in the past?<br> <mstange> ... The proposal is to add two new properties, for the over and under edge.<br> <mstange> ... Which strips the size of the space down to a particular font metric.<br> <Rossen> q?<br> <mstange> ... The proposal is to have leading-trim-over/under properties which strip out the space.<br> <Rossen> ack fantasai<br> <mstange> dbaron: I'm concerned about how this works if you have multiple things in a line.<br> <mstange> ... If the goal is to have two things to line up with each other, adding properties which help you remove one of the things that cause the misalignment helps you get there, but it is not solving the problem as directly as you'd like.<br> <mstange> fantasai: We also need the ability to control the line box sizing more precisely.<br> <mstange> dbaron: What I'm thinking is that this seems more like a use case for something like line grid, or something line grid-ish.<br> <mstange> fantasai: It is not about having a grid.<br> <mstange> ... It is about having the top align with an adjacent thing, or precisely controlling padding.<br> <mstange> fantasai: If I have letters in a box with padding, the amount of space between the top of the capital letters and the top of the box, visually speaking, is not the number in my padding property.<br> <mstange> fantasai: Having a line grid will not make that go away. It makes sure that consecutive lines have a particular rhythm, but it doesn't strip out this space.<br> <mstange> fantasai: The problem in the images in this issue is that the top of the text is not lining up.<br> <mstange> dbaron: One of them is about getting two things to line up, and one of them is about getting uniform spacing around something.<br> <mstange> fantasai: The distance between the content box top edge and the text as you see it visually is not controllable by the author.<br> <astearns> (agrees with fantasai fwiw - this seems useful with or without a grid)<br> <florian> q+<br> <mstange> dauwhe: I've seen this problem in my work.<br> <mstange> fantasai: Our job is to make it so that you don't need JavaScript to do basic layout.<br> <mstange> fantasai: (Comparing to initial letter:) We do very precise alignment for initial letter. It is not about measuring the space, it is about getting the browser leave enough space.<br> <dbaron> I actually didn't finish saying what I was trying to say<br> <mstange> koji: Would like to have these metrics be accessible from both CSS layout and from an API.<br> <mstange> dbaron: What I was wondering is whether this is going to make other things that we want to do in this space harder.<br> <mstange> dbaron: Is this an independent thing that is going to be able to float on its own or does it make other things more complicated?<br> <mstange> ... It's probably ok but I'm a bit worried about it.<br> <mstange> fantasai: If your concern is about the line grid stuff, this is just about helping to set where that line grid starts.<br> <mstange> ... Line grid snaps baselines. Whatever calculation we do here is not going to affect the ability to snap things to baselines.<br> <mstange> ... And step sizing works on the margin box, so it's not going to be badly affected by this either.<br> <mstange> florian: Detail: This needs to apply to the first and last lines in the paragraph, and not just to the direct children.<br> <mstange> ... This is not a problem with the design, but should be explained.<br> <mstange> ... If you have several paragraphs, you want this to apply to the first line of the first paragraph, not to each paragraph.<br> <mstange> dbaron: So you're saying it should be a non-inherited property that applies to the element that has the first line.<br> <jensimmons> if this is helpful to anyone, I just wrote this demo to help me: https://codepen.io/jensimmons/pen/GYYpvN<br> <dbaron> s/element that has the first line/first formatted line/<br> <mstange> koji: I support it.<br> <mstange> Resolved: Add a leading trimming feature to the CSS inline spec.<br> <dbaron> Probably most people will mispronounce "leading" when they see it...<br> <astearns> they do<br> <astearns> maybe line-height-trim instead?<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3240#issuecomment-432313494 using your GitHub account
Received on Tuesday, 23 October 2018 16:11:48 UTC