<p>A basic mixin is essentially an include or a partial for a snippet of CSS. They're written just like a CSS class and can be called anywhere.</p>
<p>{{_i}}A basic mixin is essentially an include or a partial for a snippet of CSS. They're written just like a CSS class and can be called anywhere.{{/i}}</p>
<preclass="prettyprint linenums">
<preclass="prettyprint linenums">
Coming soon!
.element {
.clearfix();
}
</pre>
</pre>
</div><!-- /span4 -->
</div><!-- /span4 -->
<divclass="span4">
<divclass="span4">
<h3>Parametric mixins</h3>
<h3>{{_i}}Parametric mixins{{/i}}</h3>
<p>A parametric mixin is just like a basic mixin, but it also accepts optional Parameters (hence the name).</p>
<p>{{_i}}A parametric mixin is just like a basic mixin, but it also accepts parameters (hence the name) with optional default values.{{/i}}</p>
<preclass="prettyprint linenums">
<preclass="prettyprint linenums">
Coming soon!
.element {
.border-radius(4px);
}
</pre>
</pre>
</div><!-- /span4 -->
</div><!-- /span4 -->
<divclass="span4">
<divclass="span4">
<h3>Easily add your own</h3>
<h3>{{_i}}Easily add your own{{/i}}</h3>
<p>Nearly all of Bootstrap's mixins are stored in mixins.less, a wonderful utility .less file that enables you to use a mixin in any of the .less files in the toolkit.</p>
<p>{{_i}}Nearly all of Bootstrap's mixins are stored in mixins.less, a wonderful utility .less file that enables you to use a mixin in any of the .less files in the toolkit.{{/i}}</p>
<p>So, go ahead and use the existing ones or feel free to add your own as you need.</p>
<p>{{_i}}So, go ahead and use the existing ones or feel free to add your own as you need.{{/i}}</p>
</div><!-- /span4 -->
</div><!-- /span4 -->
</div><!-- /row -->
</div><!-- /row -->
<h2>Included mixins</h2>
<h2>{{_i}}Included mixins{{/i}}</h2>
<h3>Utilities</h3>
<h3>{{_i}}Utilities{{/i}}</h3>
<tableclass="table table-bordered table-striped">
<tableclass="table table-bordered table-striped">
<thead>
<thead>
<tr>
<tr>
<thclass="span4">Mixin</th>
<thclass="span4">{{_i}}Mixin{{/i}}</th>
<th>Parameters</th>
<th>{{_i}}Parameters{{/i}}</th>
<th>Usage</th>
<th>{{_i}}Usage{{/i}}</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
<tr>
<tr>
<td><code>.clearfix()</code></td>
<td><code>.clearfix()</code></td>
<td><emclass="muted">none</em></td>
<td><emclass="muted">none</em></td>
<td>Add to any parent to clear floats within</td>
<td>{{_i}}Add to any parent to clear floats within{{/i}}</td>
</tr>
</tr>
<tr>
<tr>
<td><code>.center-block()</code></td>
<td><code>.center-block()</code></td>
<td><emclass="muted">none</em></td>
<td><emclass="muted">none</em></td>
<td>Auto center a block-level element using <code>margin: auto</code></td>
<td>{{_i}}Auto center a block-level element using <code>margin: auto</code>{{/i}}</td>
</tr>
</tr>
<tr>
<tr>
<td><code>.ie7-inline-block()</code></td>
<td><code>.ie7-inline-block()</code></td>
<td><emclass="muted">none</em></td>
<td><emclass="muted">none</em></td>
<td>Use in addition to regular <code>display: inline-block</code> to get IE7 support</td>
<td>{{_i}}Use in addition to regular <code>display: inline-block</code> to get IE7 support{{/i}}</td>
</tr>
</tr>
<tr>
<tr>
<td><code>.size()</code></td>
<td><code>.size()</code></td>
<td><code>@height: 5px, @width: 5px</code></td>
<td><code>@height: 5px, @width: 5px</code></td>
<td>Quickly set the height and width on one line</td>
<td>{{_i}}Quickly set the height and width on one line{{/i}}</td>
</tr>
</tr>
<tr>
<tr>
<td><code>.square()</code></td>
<td><code>.square()</code></td>
<td><code>@size: 5px</code></td>
<td><code>@size: 5px</code></td>
<td>Builds on <code>.size()</code> to set the width and height as same value</td>
<td>{{_i}}Builds on <code>.size()</code> to set the width and height as same value{{/i}}</td>
</tr>
</tr>
<tr>
<tr>
<td><code>.opacity()</code></td>
<td><code>.opacity()</code></td>
<td><code>@opacity: 100</code></td>
<td><code>@opacity: 100</code></td>
<td>Set, in whole numbers, the opacity percentage (e.g., "50" or "75")</td>
<td>{{_i}}Set, in whole numbers, the opacity percentage (e.g., "50" or "75"){{/i}}</td>
</tr>
</tr>
<tr>
<tr>
<td><code>.reset-filter()</code></td>
<td><code>.reset-filter()</code></td>
<td><emclass="muted">none</em></td>
<td><emclass="muted">none</em></td>
<td>Resets any IE filter</td>
<td>{{_i}}Resets any IE filter{{/i}}</td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
...
@@ -410,16 +414,16 @@
...
@@ -410,16 +414,16 @@
<tableclass="table table-bordered table-striped">
<tableclass="table table-bordered table-striped">
<thead>
<thead>
<tr>
<tr>
<thclass="span4">Mixin</th>
<thclass="span4">{{_i}}Mixin{{/i}}</th>
<th>Parameters</th>
<th>{{_i}}Parameters{{/i}}</th>
<th>Usage</th>
<th>{{_i}}Usage{{/i}}</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
<tr>
<tr>
<td><code>.placeholder()</code></td>
<td><code>.placeholder()</code></td>
<td><code>@color: @placeholderText</code></td>
<td><code>@color: @placeholderText</code></td>
<td>Set the <code>placeholder</code> text color for inputs</td>
<td>{{_i}}Set the <code>placeholder</code> text color for inputs{{/i}}</td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
...
@@ -427,46 +431,46 @@
...
@@ -427,46 +431,46 @@
<tableclass="table table-bordered table-striped">
<tableclass="table table-bordered table-striped">
<thead>
<thead>
<tr>
<tr>
<thclass="span4">Mixin</th>
<thclass="span4">{{_i}}Mixin{{/i}}</th>
<th>Parameters</th>
<th>{{_i}}Parameters{{/i}}</th>
<th>Usage</th>
<th>{{_i}}Usage{{/i}}</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
<tr>
<tr>
<td><code>#font > #family > .serif()</code></td>
<td><code>#font > #family > .serif()</code></td>
<td></td>
<td><emclass="muted">none</em></td>
<td></td>
<td>{{_i}}Make an element use a serif font stack{{/i}}</td>