Editing Template:Div col
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | <includeonly> | + | <includeonly><templatestyles src="Div col/styles.css"/> |
<div class="div-col {{#ifeq:{{{small|}}}|yes|div-col-small}} {{#ifeq:{{{rules|}}}|yes|div-col-rules}}" | <div class="div-col {{#ifeq:{{{small|}}}|yes|div-col-small}} {{#ifeq:{{{rules|}}}|yes|div-col-rules}}" | ||
{{#if:{{{colwidth|}}}{{{gap|}}}{{{style|}}}| | {{#if:{{{colwidth|}}}{{{gap|}}}{{{style|}}}| | ||
style="{{#if:{{{colwidth|}}}|column-width: {{{colwidth}}};}}{{#if:{{{gap|}}}|column-gap: {{{gap}}};}}{{#if:{{{style|}}}|{{{style}}}}}" | style="{{#if:{{{colwidth|}}}|column-width: {{{colwidth}}};}}{{#if:{{{gap|}}}|column-gap: {{{gap}}};}}{{#if:{{{style|}}}|{{{style}}}}}" | ||
}}> | }}> | ||
− | {{#if:{{{content|}}}|{{{content}}}</div>}} | + | {{#if:{{{content|}}}|{{{content}}}</div>}} Inventory how many pages use small=yes |
+ | {{#ifeq:{{{small|}}}|yes|[[Category:Pages using div col with small parameter]]}} | ||
</includeonly> | </includeonly> | ||
<noinclude> | <noinclude> | ||
Line 12: | Line 13: | ||
===Descriptions=== | ===Descriptions=== | ||
There are six parameters for this template: | There are six parameters for this template: | ||
− | : Specifies the minimum width of the columns so that the number of columns is automatically based on screen width (that is, more columns will be shown on wider displays). If no value is supplied, the template uses a default of 30em. The width can be specified in any CSS unit of measure, for instance, the em (about the width of the capital "M" of the displayed typeface), e.g., <code>colwidth=20em</code>. | + | : Specifies the minimum width of the columns so that the number of columns is automatically based on screen width (that is, more columns will be shown on wider displays). If no value is supplied, the template uses a default of 30em. The width can be specified in any [[CSS#Length units|CSS unit of measure]], for instance, the [[Em (typography)|em]] (about the width of the capital "M" of the displayed typeface), e.g., <code>colwidth=20em</code>. |
: Adds vertical lines ("rules") between the columns if set to <code>yes</code>. | : Adds vertical lines ("rules") between the columns if set to <code>yes</code>. | ||
: Specifies the space between the content of adjacent columns, in any valid CSS width unit, e.g., <code>gap=2em</code>. The default spacing (set by browser) is 1em. | : Specifies the space between the content of adjacent columns, in any valid CSS width unit, e.g., <code>gap=2em</code>. The default spacing (set by browser) is 1em. | ||
Line 221: | Line 222: | ||
<pre> | <pre> | ||
{{div col|colwidth=20em}} <!--Lorem ipsum --> | {{div col|colwidth=20em}} <!--Lorem ipsum --> | ||
− | + | {{lorem ipsum}} | |
{{div col end}} | {{div col end}} | ||
</pre> | </pre> | ||
Produces | Produces | ||
{{Div col|colwidth=20em}} | {{Div col|colwidth=20em}} | ||
− | + | {{lorem ipsum}} | |
{{Div col end}} | {{Div col end}} | ||
Line 256: | Line 257: | ||
* h | * h | ||
}} | }} | ||
+ | |||
+ | Turning off the {{code|break-inside: avoid-column;}} rule appears to help.<!-- A full page refersh is needed; just F12-ing doesn't work. --> | ||
</noinclude> | </noinclude> |