- From: Andrew Fedoniouk <news@terrainformatica.com>
- Date: Tue, 23 Oct 2012 09:03:50 -0700
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: www-style list <www-style@w3.org>
On Tue, Oct 23, 2012 at 8:29 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote: > On Mon, Oct 22, 2012 at 7:30 PM, Andrew Fedoniouk > <news@terrainformatica.com> wrote: >> There is no way in current multi-column spec to disable "multi-columnes" >> Let's say we have this: >> >> div { columns-count:3; column-width: 45px; } >> >> And you will want to disable column layout on mobile. >> >> @media handheld { >> div { ... how to switch to default block layout here? ... } >> } >> how to do that? Defining display:block will not help you >> to remove columns, right? > > div { columns: auto; } > > The initial value *obviously* turns off multicol, since it's not on by default. > Far not that obvious: columns: <‘column-width’> || <‘column-count’> Both ‘column-width’ and 'column-count’ accept 'auto' values. "'auto' means that the column width will be determined by other properties". So the only way to remove multi-column layout is: columns: auto auto; But see how fragile is the whole system is: 1. Each LM has different rules to apply/remove given layout. 2. List of LMs is an open set - we will add more layout methods/managers. And with each LM you don't know upfront their precedence. For example, what layout will be used in this case: div { columns: 4; grid-columns: 50% * * 4em; } ? -- Andrew Fedoniouk. http://terrainformatica.com
Received on Tuesday, 23 October 2012 16:04:18 UTC