Template:Div col

From RationalWiki
Jump to navigation Jump to search

[edit] [purge] Documentation

Lifted from the other wiki

{{Div col}} (or {{start div col}}), together with {{div col end}} (or {{end div col}}), is used to make a list into columns. It automatically breaks each column into an equal space, meaning, for instance, it isn't necessary to work out the halfway point between two columns. The template also offers options to set a smaller (90%) font-size (|small=yes), place vertical lines ("rules") between the columns (|rules=) and to add other custom styling (|style=).

{{Div col}} can create multiple columns in web browsers which support one of the following CSS properties:

  • column-count (for CSS3 compliant browsers; see CSS3 module: Multi-column layout)
  • -moz-column-count (for Mozilla/Gecko based browsers such as Firefox)
  • -webkit-column-count (for WebKit based browsers such as Safari and Google Chrome)

Examples

{{Div col}}   [or {{Start div col}}]
* a
* b
* c
* d
* e
* f
* g
* h
{{Div col end}}   [or {{End div col}}]
produces
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
{{Div col|3}}
* a
* b
* c
* d
* e
* f
* g
* h
{{Div col end}}
produces
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
{{Div col||10em}}
* a
* b
* c
* d
* e
* f
* g
* h
{{Div col end}}
produces
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
{{Div col|rules=yes}}
* a
* b
* c
* d
* e
* f
* g
* h
{{Div col end}}
produces
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
{{Div col|small=yes}}
* a
* b
* c
* d
* e
* f
* g
* h
{{Div col end}}
produces
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h


es:Plantilla:Div col

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools.

TemplateData for Div col

<templatedata> {

"description": "Breaks a list into columns. It automatically breaks each column to an equal space, so you do not manually have to find the half way point on two columns. The list is closed with .",

   "params": {
       "cols": {
           "label": "cols",
           "description": "Specifies the number of columns.",
           "type": "string",
           "default": "2",
           "aliases": ["1"],
           "required": false
       },
       "colwidth": {
           "label": "colwidth",
           "description": "Specifies the width of columns, and determines dynamically the number of columns based on screen width; more columns will be shown on wider displays. This overrides the 'cols' setting.",
           "type": "string",
           "aliases": ["2"],
           "required": false
       },
       "rules": {
           "label": "rules",
           "description": "Produces vertical rules between the columns if set to yes.",
           "type": "string",
           "required": false
       },
       "small": {
           "label": "small",
           "description": "Specifies small font size (90%) if set to yes.",
           "type": "string",
           "required": false
       },
       "style": {
           "label": "style",
           "description": "Specify any custom styling.",
           "type": "string",
           "required": false
       }
   }

} </templatedata>