W3C home > Mailing lists > Public > www-style@w3.org > October 2008

Re: [gcpm] border-parts

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 30 Oct 2008 07:13:35 -0500
Message-ID: <dd0fbad0810300513n3ffdd1ber72346e7c569b027f@mail.gmail.com>
To: "Håkon Wium Lie" <howcome@opera.com>
Cc: www-style@w3.org
On Wed, Oct 29, 2008 at 5:02 PM, Håkon Wium Lie <howcome@opera.com> wrote:

> The 'border-parts' property [1] was discussed at the recent f2f
> meeting of the CSS WG. The purpose of this property is to split the
> border into parts where every other part is visible. This gives us a
> flexible model to express common borders, e.g., for footnotes.
> Two additions were discussed:
>  - the 'repeat()' function for repeating patterns
>  - the 'fr' unit as per css3-grid [2]
> I've added a description of how this could work i [1] with some
> examples. Feedback welcome.
> [1] http://dev.w3.org/csswg/css3-gcpm/Overview.html#border
> [2] http://dev.w3.org/csswg/css3-grid/
> Cheers,
> -h&kon
>               Håkon Wium Lie                          CTO °þe(R)ª
> howcome@opera.com                  http://people.opera.com/howcome

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

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).

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.

% 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.

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

Received on Thursday, 30 October 2008 12:14:12 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:40 UTC