Re: [css3-layout] shorthand for slot construction

Tab Atkins Jr. wrote:
> On Sun, Oct 18, 2009 at 10:21 AM, Stephen Hay <> wrote:
>> Let's say for the sake of argument that you need that level of detail
>> ;) The idea comes from css3-grid, where e.g.:
>> body { grid-columns: * * (0.5in * *)[2];
> If you need that level of detail you probably want to actually express
> it explicitly; at least, that's how it seems to me.
> Yeah, CSS3 Grid allows repeats, but it's addressing a different
> problem.  In many cases with grids you explicitly have a repeating
> grid, and so saying that outright is useful and clearer than writing
> it out longhand.  I don't think Template will be used for quite the
> same thing.
>>> ...oh.  Wait.  ::looks up the current draft::  Full support for flex
>>> units doesn't appear to exist in the current draft for whatever
>>> reason.
>>> Now, in this particular instance, since all of the lengths are flexes,
>>> you can replace them with %s (use "83.3% 8.3% 8.3%").  But that's not
>>> possible if one of the columns (often the spacer column in your
>>> example) is an absolute length.  (Well, you could use relatively
>>> complex calc() hacking, like "calc((100% - 2em) * 10 / 11)", but let's
>>> not be silly.)
>> We'd rather keep using floats, I suspect.
> Nod.  Or other technologies, like Grid.
>>> So I think this problem really boils down to just "Template Layout
>>> needs to support proper flex units".
>> Would that mean incorporating more of flexbox module into template
>> layout? I assume the idea is to end up with one general layout module?
> Not necessarily.  Flexbox does have a box-flexibility property, but
> the idea of flex units is more generally useful.  I forget now what
> module it's in, but Hakon defined flex units as "fractional" units
> (using fr as the unit indicator) in one of the modules he edits.  We
> can just reuse that.
> (I doubt that a general layout module would be very useful.  Different
> approaches are best for solving different layout problems, especially
> when you have such a focus on simplicity of authoring as CSS.  Generic
> approaches are generally substantially more complex.)

Are you speaking about this: ?

And about "body { grid-columns: * * (0.5in * *)[2];" in templates...

width/min-width/max-width defined on involved elements are more
convenient for such layouts.

.col2 { width:*; min-width:10px; max-width:50%; }
will make .col2 flexible with boundary constraints.

In any case having one more place of defining element dimensions (that 
grid-columns thing) will create logical conflicts with existing box
module and width/height [+min/max]
attributes defined there.

> ~TJ

Andrew Fedoniouk.

Received on Sunday, 18 October 2009 17:42:53 UTC