- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Sun, 18 Oct 2009 11:00:23 -0500
- To: Stephen Hay <haymail@gmail.com>
- Cc: Www-style <www-style@w3.org>
On Sun, Oct 18, 2009 at 10:21 AM, Stephen Hay <haymail@gmail.com> 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.) ~TJ
Received on Sunday, 18 October 2009 16:01:17 UTC