Difference between revisions of "Template:Flex columns/doc"

From blackwiki
Jump to navigation Jump to search
imported>Evad37
(start)
 
imported>Evad37
(→‎Usage: flex-columns-noflex)
Line 12: Line 12:
 
|2 = (...second column contents...)
 
|2 = (...second column contents...)
 
}}</pre>
 
}}</pre>
Only contents which are in {{tag|div}} tags will have extra whitespace distributed to them.
+
Only contents which are in {{tag|div}} tags will have extra whitespace distributed to them – except for those with class <code>flex-columns-noflex</code> (or otherwise override the <code>flex:</code> property)
 
<includeonly>{{sandbox other||
 
<includeonly>{{sandbox other||
 
<!-- Categories below this line, please; interwikis at Wikidata -->
 
<!-- Categories below this line, please; interwikis at Wikidata -->
  
 
}}</includeonly>
 
}}</includeonly>

Revision as of 03:36, 26 July 2018

Template:Uses Lua Script error: No such module "Uses TemplateStyles". This template creates a column layout, where contents within the columns will have the same height, with any extra whitespace distributed throughout the shorter columns contents. It is mainly intended for use in portals.

This sort of layout requires browsers to support CSS flexbox. For those that don't there is a fallback that will show a two column view, but without the heights being the same (a layout many portals used as at July 2018).

Usage

{{Flex columns
|1 = (...first column contents...)
|2 = (...second column contents...)
}}

Only contents which are in <div>...</div> tags will have extra whitespace distributed to them – except for those with class flex-columns-noflex (or otherwise override the flex: property)