-
Notifications
You must be signed in to change notification settings - Fork 708
[css-overflow] ensure interactions between block-overflow and text-overflow are defined #2882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think this is mostly defined. Side note 1: your example needs Side note 2: your example needs a second line of text in the div, otherwise Assuming we have more than 1 line's worth of content, and non-visible overflow:
The only problem is if the ellipsis string itself is longer than the line. The spec says:
I think this idea of replacing content in earlier lines, while nice, would bring it a lot of complexity, and that undefined behavior isn't helpful here. I'd suggest switching to
That makes the whole thing much simpler and fully defined, and sufficient to handle the primary use case of this feature. And if we later want to introduce the idea of replacing content in earlier lines, we can add a switch. We may not even need a new property for that, and might be able to retroactively pretend that the UA stylesheet contains cc: @fantasai What do you think? |
The CSS Working Group just discussed
The full IRC log of that discussion<astearns> topic: block-overflow and text-overflow<astearns> github: https://github.com//issues/2882 <emilio> florian: so the issue is about whether their interaction is well-defined. There's only one case where it's not defined. <emilio> florian: if you have a break opportunity during the line we'll insert the ellipsis after that break opportunity and block-overflow doesn't have the chance to apply <emilio> florian: the only case where it's not defined is where the ellipsis is longer than the whole line, right now the spec doesn't define it <emilio> florian: seems like we don't want the ellipsis to climb the line back up, so for now I think we should go for 'when the ellipsis is longer than the line then it does overflow, and text-overflow must apply' <emilio> tantek: I think we need an example that we could look up <emilio> florian: it's something like a very narrow paragraph with a very long block-overflow ellipsis <emilio> florian: the spec says that if block-overflow ellipsis overflows then it may overflow to the next line, but it's undefined <emilio> tantek: any implementation experience? <emilio> tantek: we should construct some examples and experiment, keeping the issue open for now <emilio> tantek: rather than spec something that is not easy to implement <dbaron> It seems like "use multiple lines for the block-overflow indicator" is probably the better behavior from a user perspective, but it does seem hard to implement. <emilio> fantasai: seems fine to leave it open as people implement it <emilio> florian: so I'd expand on the proposal with examples in the issue <emilio> florian: I'm ok with that <emilio> dbaron: [what he wrote above] <emilio> dbaron: saying that it needs to fit on one line definitely makes implementation easier, but it's not clear how much <emilio> tantek: I'd prefer to specify the better behavior for the user, and we don't know how much harder it is <emilio> fantasai: so what we're hearing is that we should the issue open to wait for block ellipsis breaking across multiple lines, but we probably should say that if the block-overflow string still doesn't fit withing the block then text-overflow applies in that case as it would to any other text <emilio> astearns: I like the idea of working out concrete examples so that people get better idea, but also so that we can put them in the spec <emilio> florian: does it sound reasonable to resolve on what fantasai said and add examples for the block-ellipsis on multiple lines? <emilio> fantasai: I think we should resolve that text-overflow applies to the overflow string if there's an unbreakable string on it like it does to the rest <emilio> fantasai: also that we should put some example in the spec about this interaction, and also on the issue about what happens if the block-overflow string can break <emilio> fantasai: we could narrow down the behavior as 'either you treat is as unbreakable' or 'treat it as breakable and grab space from previous lines' <emilio> astearns: so the first bit is to resolve that text-overflow affects overflowing, unbreakable portions of the block-overflow string. objections? <emilio> RESOLVED: text-overflow affects non-breakable portions of the block-overflow string <emilio> astearns: probably the examples doesn't need a resolution <emilio> astearns: we're going to work on those to put them on the spec <emilio> florian: I'm going to put examples in the spec on what we just resolved, and then in the issue about the wrapping <emilio> astearns: should that be a different issue? <emilio> florian: maybe, sounds reasonable <emilio> astearns: we'll leave it to your discretion <emilio> florian: should we resolve on the breaking to narrow it down to the two discussed options? <emilio> astearns: don't care <emilio> florian: I think I prefer to leave as-is for now <emilio> florian: then we can narrow if we don't resolve soon <emilio> astearns: I think that's reasonable, I prefer to resolve soon, the examples would be really helpful |
https://drafts.csswg.org/css-overflow-3/#block-ellipsis
I wonder if there are any undefined interactions between text-overflow and block-overflow. For example is it clear what happens when you have:
It may be, but I think it is worth explicitly mentioning in the spec.
The text was updated successfully, but these errors were encountered: