- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Fri, 04 Aug 2017 08:36:19 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `CSS Break`. <details><summary>The full IRC log of that discussion</summary> <fantasai> Topic: CSS Break<br> <TabAtkins> ScribeNick: TabAtkins<br> <TabAtkins> fantasai: We had a request from Nigel to add a value for the box-decoratio-break property. CAn you explain?<br> <fantasai> github: https://github.com/w3c/csswg-drafts/issues/1633<br> <TabAtkins> nigel: IMagine you're displaying subtitles, and for a11y you want to put a high-contrast background behind the text. Not on the whole <p>, just behind the lines.<br> <TabAtkins> nigel: You don't want the bg to be tightly wrapped to the text edges - you want it to extend slightly out for readability<br> <TabAtkins> nigel: But you cant predict the linebreaks.<br> <TabAtkins> nigel: That's okay righ tnow with b-d-b: clone<br> <TabAtkins> nigel: But then what if you have a span in the middle of the text with a different color bg.<br> <TabAtkins> nigel: And the break falls in the middle of that other span.<br> <TabAtkins> nigel: You want the span's bg to be what extends; you want to use padding to display that.<br> <TabAtkins> nigel: So the most relevant bg color to "extend" is from the innermost element at the break, not the element that sets b-d-b.<br> <TabAtkins> nigel: fantasai asked a good question.<br> <TabAtkins> nigel: Should it be "most nested" or "most nested thing that *counts", paraphrasing.<br> <TabAtkins> fantasai: I think we have this problem generally with fragmentation.<br> <TabAtkins> fantasai: At the break, you want to ahve a little bit of extra padding with the bg beneath it.<br> <TabAtkins> fantasai: It's possible that maybe we can solve this by just saying "add this amount of padding at the break".<br> <TabAtkins> fantasai: Whether that solves this is, do you need borders too? Or just backgrounds.<br> <TabAtkins> fantasai: Like a border around the inline that only closes if it's the innermost nested border?<br> <TabAtkins> fantasai: Seems weird, I guess not.<br> <TabAtkins> nigel: I think for border-radius you want [...]?<br> <TabAtkins> fantasai: If both have b-r; normally we'd just slice and get the green and black backgrounds overlapping eachother on a clean break.<br> <TabAtkins> fantasai: If only the green gets a border-radius, you'll see the black background peeking out from under the green.<br> <TabAtkins> fantasai: That's a problem.<br> <TabAtkins> Rossen: I think this is in conjuction with the line-padding property in TTML, right?<br> <TabAtkins> nigel: Yeah.<br> <dbaron> a general 'break-padding' property sounds like it could be useful...<br> <TabAtkins> Rossen: box decoration and fragmentation, you're talking about linebreaking, nto general box breaking<br> <TabAtkins> TabAtkins: It can be about boxes too.<br> <astearns> I think it would be helpful to have a diagram in https://www.w3.org/TR/ttml2/#style-attribute-inlineAreaBreak that showed a rendering using each value for cases where there's a difference<br> <TabAtkins> Rossen: Sure, but that's not his requirement.<br> <TabAtkins> Rossen: Also something we don't have in CSS is line-padding that extends in every break.<br> <fantasai> dbaron, yeah, that's what I was thinking. But it doesn't solve the border-radius case he was describing<br> <TabAtkins> nigel: Line padding was introduced to IMSC when border-radius wasn't available in TTML; at that point the only styling you could do was bg-color and get a square box.<br> <TabAtkins> nigel: Now with b-r it's gotten more complicated, and probably need to extend it a little further than just the line-padding semantic, to include the other bg effects (or things that otherwise affect the background)<br> <TabAtkins> nigel: Your point about targeting line areas specifcially is well made.<br> <TabAtkins> nigel: If there was a way to say "for each line in this <p>, apply this styling" that would be really helpful, but that doesn't seem to exist yet.<br> <TabAtkins> fantasai: I think it would be relatively easy to describe as only things that work are background and things on the box, not background.<br> <Rossen> Here's nigel's example https://github.com/w3c/imsc-tests/blob/master/imsc1/png/linePadding2/0.000000.png<br> <TabAtkins> fantasai: Once inheritance applies it's hard.<br> <TabAtkins> fantasai: We have this problem with ::first-line; it's a mess, lots of bugs, spec isn't precise enough despite our efforts.<br> <TabAtkins> fantasai: But if it's just about "background here, put a b-r on it", it's not too hard.<br> <TabAtkins> fantasai: Not high prio to do in browsers, but wouldn't be too hard.<br> <TabAtkins> iank_: We don't have an architecture that can support that (styling lines individually). It's several years away.<br> <TabAtkins> Rossen: The existing model of line boxes in most impls, certainly in Edge, is not easily extdendable to support this. Not impossible, but it would be quite hard.<br> <TabAtkins> Rossen: Tho this is a valid use-case and feature.<br> <TabAtkins> fantasai: What's line-padding?<br> <TabAtkins> Rossen: Imagine you have a span - I posted on of Nigel's examples - that adds bg to the current inline. And the span breaks. You can put padding on the span - you'll get padding at the start and end of the span. If it fits on one line, great; the bg will extend a little past the text.<br> <TabAtkins> Rossen: But if the text breaks in the middle, you have some padding on start of first fragment and end of last fragment, but all other broken edges have no padding.<br> <TabAtkins> Rossen: line-padding feature adds padding to every break-edge.<br> <TabAtkins> Rossen: Basically to the linebox itself.<br> <TabAtkins> Rossen: if the linebox has background, it extends.<br> <TabAtkins> fantasai: The linebox is wider than that actually, but I get what you're saying.<br> <TabAtkins> fantasai: Taht makes sense, and I see how adding border-radius would be tricky.<br> <TabAtkins> nigel: Doing just the inline-padding isn't the only place we want to do something with line areas.<br> <TabAtkins> nigel: Another feature, fill-line-gap, says "draw background areas between lines".<br> <TabAtkins> nigel: Hard now, because character heights are UA-dependent.<br> <TabAtkins> nigel: So can't specify a padding-top/bottom that correctly fills in the space between lines.<br> <TabAtkins> fantasai: Question I have - you ahve a line of text with some line-spacing, say 1.5. You're seeing there's a bg below the text, and a .5em gap between the lines.<br> <TabAtkins> fantasai: When asking to fill the linegap, you're filling that .5em space, what happens at the top and the bottom? Do you add .25em at each? So each line gets .25em of bg above and below? Or just between the lines?<br> <TabAtkins> nigel: At the moment we don't say.<br> <TabAtkins> fantasai: Ok, thiat's a really important question to answer in CSS.<br> <TabAtkins> fantasai: Second question, if two lines have different lengths, what happens?<br> <Rossen> line-box-margin: collapse<br> <TabAtkins> nigel: Probably we take whatever answer is most convenient.<br> <TabAtkins> nigel: But as far as I know you can't set a padding value, because you can't calculate it...<br> <TabAtkins> fantasai: We should specify that...<br> <TabAtkins> TabAtkins: Why's it hard? Just the diff between font-size and line-height, right?<br> <TabAtkins> fantasai: Not quite - the bg area isnt' the size of the line box. The area around an inline - in 2.1 there were two ways to calculate the area, based on font metrics, and impls might do different things.<br> <TabAtkins> Rossen: This is going a bit off topic, can we bring it back to b-d-b?<br> <fantasai> s/line box/line height box of the inline that's used for layout/<br> <nigel> -> https://github.com/w3c/csswg-drafts/issues/814 [css-inline] Define the content area of inline boxes #814<br> <Rossen> q?<br> <TabAtkins> TabAtkins: So it sounds like b-d-b: inner-clone badly solves border-radius issues, and limiting it to just background is better solved with a break-padding property?<br> <fantasai> break-padding also causes problems with border-radius<br> <TabAtkins> fantasai: So I think those are the main two request from Nigel, this and figuring out the fill-the-gaps issue.<br> <TabAtkins> fantasai: Which I think is best done by making impls interoperable, then just using padding on the element.<br> <TabAtkins> fantasai: If we have a consistent box height, then having a line-height of 1.5 and a padding on inline of .25em above and below *should* fix the gap; if it doesn't, we should fix that.<br> <TabAtkins> fantasai: And for the other issue of cloning spaces - it seems the solution you're proposing doesn't actually solve the problem.<br> <TabAtkins> fantasai: It's not just "clone most nested"; if there is b-r involved, you want to spam that innermost b-r all the way up, so the lower backgrounds dont' show up underneath the topmost's b-r.<br> <TabAtkins> Rossen: So yeah, the feature request is something we'll work on, probably as part of Break. We'll go from there!<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1633#issuecomment-320191629 using your GitHub account
Received on Friday, 4 August 2017 08:36:26 UTC