- From: Brad Kemper <brad.kemper@gmail.com>
- Date: Tue, 22 Oct 2013 23:38:15 -0700
- To: Håkon Wium Lie <howcome@opera.com>
- Cc: Simon Sapin <simon.sapin@exyr.org>, "www-style@w3.org" <www-style@w3.org>
> On Oct 22, 2013, at 5:20 AM, Håkon Wium Lie <howcome@opera.com> wrote: > > The space is distributed according to this rule: > > Distribute the empty space between the leaders on the line. Glyphs > must not be shown partially. All leaders on the line should, to the > extent possible, have the same length. This may not always be > possible as the minimum leader length must be honored. > > http://books.spec.whatwg.org/#leaders > > Can you see cases not covered by this? This is really a separate question, but related. The spec talks about "the line" and empty space space. The step before the one quoted says "Determine the empty space left on the line." It seems like both "the line" and "empty space" should be defined more concretely. Maybe it is more obvious if you are dealing only with inline elements (or inline pseudo-elements). But what if the item that has the leader content is an inline block and/or if that item is inside an inline block? Do you do make the inline block as big as you can (up to its width or max-width) to fill out the line outside the inline block, or does the inline-block shrink to fit the minimal leader length? What if the leader element/pseudo-element is floated? Or is wrapped in something that is floated? What is 'the line' in that case (there might be several lines outside the float with much smaller line heights, for instance)? Does it grow in width to fill its container if there is no other content? Or if there is some sibling text, is that text pushed to the right by the leader that is filling the rest of the space? Do other floats affect its width calculation if it is itself floating or if it's parent is floating? What happens if the leader element/pseudo-element is absolutely positioned? Or maybe it is not itself absolutely positioned, but it's parent is, with an auto width? Is that width affected to grow infinitely, or only enough to contain the minimal size leader? The spec does say, "These properties influence the appearance of leaders: all font properties, text properties, 'letter-spacing', white-space properties, background properties, and 'color'." I guess it means only those properties can change any initial values at all, if the cascaded value of 'content' is a leader(). Is that practically enforceable on something based on the content value only? Suppose I have this: div { content: leader(dotted); } Does that negate the 'display' value for DIVs in the UA stylesheet and make DIVs into inline elements? Sort of like the opposite effect of how floating something makes it into block display? The spec also says, "the leader string is repeated as many times as possible in the writing direction". What if the leader element is between two words that each have opposite writing directions? I think I can imagine what the answers to some of these questions should be, and maybe some are answered somewhere else, but I think the spec could be made more clear on such points.
Received on Wednesday, 23 October 2013 06:38:45 UTC