From b45c3ea6479e5129f13ab2100b7fffe984c5a935 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 1 Sep 2013 11:20:58 +0200 Subject: fixes #10164: Document .center-block mixin and update CSS to include it as a class as well --- css.html | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'css.html') diff --git a/css.html b/css.html index 0188331fb..99283f2f9 100644 --- a/css.html +++ b/css.html @@ -2254,6 +2254,27 @@ For example, <section> should be wrapped as inline. +

Center content blocks

+

Set an element to display: block and center via margin. Available as a mixin and class.

+{% highlight html %} +
...
+{% endhighlight %} +{% highlight css %} +// Classes +.center-block { + display: block; + margin-left: auto; + margin-right: auto; +} + +// Usage as mixins +.element { + .center-block(); +} +{% endhighlight %} + + +

Clearfix

Clear the float on any element with the .clearfix class. Utilizes the micro clearfix as popularized by Nicolas Gallagher. Can also be used as a mixin.

{% highlight html %} -- cgit v1.2.3