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

Re: [css3-gcpm] border-length

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 15 Oct 2008 12:36:40 -0500
Message-ID: <dd0fbad0810151036q434ab6awffefb9a0ad6894e8@mail.gmail.com>
To: "Håkon Wium Lie" <howcome@opera.com>
Cc: www-style@w3.org
On Wed, Oct 15, 2008 at 10:40 AM, Håkon Wium Lie <howcome@opera.com> wrote:

> Also sprach Tab Atkins Jr.:  > I'd suggest putting an example into the
> spec of something you can *only* do
>  > with border-part - right now you're just duplicating what border-length
> can
>  > do.  Just use the examples you've already come up with in your email, as
>  > they demonstrate the substantial power inherent in this.
>
> Right, here it is:
>
>  http://dev.w3.org/csswg/css3-gcpm/#border1
>
> (These urls are unstable, the draft changes quickly these days)


Cool.  That works for me.


>  > Taking this idea slightly further, might this be a place to introduce
> flex
>  > units?  The auto keyword in this context is equivalent to 1fl, after
> all,
>  > and this would address the requests that a few other authors have.  I'd
> like
>  > to see a comprehensive Flex module at some point, though...
>
> So, you could say:
>
>  border-parts: 1em 1fl 1em 2fl 1em;
>
> and the first gap in the border would be half the size of the second one?
>
> It makes sense to me and I believe Philip Taylor will like it, too :)
>
> However, introducing a new unit is a pretty big deal. Where else would
> you use it?


Well, flex units can be useful all over.  ^_^  There was a substantial
discussion about it earlier, which died because the person pushing them
didn't think that it was necessary to specify all the interactions of flex
units with various things like floats.  I think it is easily usable anywhere
a % unit is currently allowed, as I believe it would always operate off of
the same length that percentages do in whatever case you have.  Frex, I
commonly do my main-navs as <ul>s styled so that the <li>s lie horizontally.
 Typically I want them to stretch the entire page.  Currently this means I
have to know exactly how many <li>s I'm going to have so that I can give
them an appropriate percentage width, but with a flex unit I'd just set
their width to 1fl and it would automatically work.

The other argument for a flex unit in this particular case, independent of
other use cases, is that you can *already* approximate them with just the
auto keyword.  Say I want to do an off-center border line.  In flexes, I
might have something like border-parts: 0 1fl 5em 2fl.  Without them,
though, I should be able to do border-parts: 0 auto 5em auto 0 auto and have
the same effect.  The thing is, with this simulation of flexes I'm limited
to whole numbers of them, while with an explicit flex unit I can do
fractional flexes (like 1.5fl).  If we're already introducing essentially
the entire flex machinery, why not flex our muscles a bit (I'm sorry, pun
intended) and throw in just a tiny bit more?

~TJ
Received on Wednesday, 15 October 2008 17:37:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:15 GMT