Permanently protected template

Difference between revisions of "Template:Break-inside"

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search
m (Reverted changes by 83.149.48.21 (talk) to last version by Verdy p)
(rm non-existent property, fix firefox.)
Line 1: Line 1:
 
{{#switch:{{lc:{{{1|}}}}}
 
{{#switch:{{lc:{{{1|}}}}}
 
|avoid|avoid-column=<!--
 
|avoid|avoid-column=<!--
-->break-inside:avoid-column;<!--CSS standard? IE?--><!--
+
-->-webkit-column-break-inside:avoid;<!--Chrome, Safari, Opera 15+--><!--
-->-webkit-column-break-inside:avoid;<!--Chrome--><!--
+
-->page-break-inside:avoid;<!--Firefox--><!--
-->-moz-column-break-inside:avoid;<!--Safari, Firefox--><!--
+
-->break-inside:avoid-column;<!--CSS standard, IE 10+-->
-->overflow:hidden;<!--fix for Firefox-->
 
 
}}<noinclude>{{documentation}}</noinclude>
 
}}<noinclude>{{documentation}}</noinclude>

Revision as of 12:06, 30 November 2014

Template documentation


Usage

This template generates the equivalent of CSS3 style property break-inside.[1][2]

On Webkit browsers (Safari, Chrome, Opera 15+), it uses the experimental property -webkit-column-break-inside.

Use it in CSS style properties to avoid a column break within a child element of a multi-column element.

Example

  • {{break-inside|avoid}} gives:
    -webkit-column-break-inside:avoid;page-break-inside:avoid;break-inside:avoid-column;

References

See also