Re: [gcpm][grid] border-parts

Also sprach Tab Atkins Jr.:

 > > [1] http://dev.w3.org/csswg/css3-gcpm/Overview.html#border

 > I like it.  The repeat() function is powerful and works as I would expect.
 > 
 > In examples XXXV and XXXVI, it's not clear to me *why* there's a remaining
 > border on one and not the other.  The boxes appear to be the same width.  A
 > note on XXXVI specifying that it has a slightly wider box than XXXV would be
 > helpful.

The boxes are, in fact, slightly different in size and this is why
there is a remaining border in one of them. I've added some text in
the examples to explain this.

 > I'm vaguely dissatisfied with the name 'fraction' as the stretchy unit.  It
 > doesn't seem to convey "this will fill available space" to me - it sounds
 > like an alternate name for a percentage, and something I should be
 > specifying with a ratio.  But this is obviously a minor issue (though if it
 > can be changed both here and in the Grid module, I'd be happy).

What would you call it instead? One flex, two flexes? And yes, this
would have to be discussed in the context of grids; I've just imported
the 'fr' unit from there. [grid] added to subject line.

 > I'd like an example with multiple fractions of various types.  Right now all
 > the examples with fr use it in the simplest way possible, and I think it
 > won't be clear just how powerful this is if there isn't something decent.
 >  Maybe a border-parts-top:3fr 10px 2fr 10px 1fr 10px 10px 10px 10px 10px 1fr
 > 10px 2fr 10px 3fr.

Good point. I've added a (slightly simpler) example.

 > % should definitely key off of pure element width, for simplicity with other
 > uses of the same.
 > 
 > I have vague thoughts swirling in my head about complexifying repeat().
 >  Right now it's a fraction with infinite value - it eats *all* available
 > space that it can, and only after it's done do the fractions have a chance
 > to grab some width.  What if you could optionally specify a width in fr, and
 > it would be laid out accordingly?  I ask because the example I suggested
 > above originally had the central "10px 10px" bit in a repeat, until I
 > remembered that it would squish the fr parts down to nearly nothing.  For
 > some reason in my head the repeat() section was going to end up something
 > like 6fr in width.  I'm not sure if this is strictly necessary, though.

I see your point -- the fractions don't combine optimally with the
repeat function. Fixing this seems complex, and perhaps not worth it.

 > What happens if you specify fr units within a repeat() expression?

That would work as long as there are lenghts/percentages there as ell.
The resulting border parts would be very short -- especially in long
borders.

If the repeat pattern consist of only on fractions, there would be
infinetely many of them. I've added text to make this illegal.

A new draft is available from:

  http://dev.w3.org/csswg/css3-gcpm/Overview.html#border

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome

Received on Thursday, 30 October 2008 13:25:35 UTC