diff --git a/_config.yml b/_config.yml index 3bddd5ed..41c17ad1 100644 --- a/_config.yml +++ b/_config.yml @@ -1,4 +1,3 @@ -# Dependencies markdown: kramdown highlighter: rouge @@ -9,6 +8,8 @@ permalink: pretty source: docs baseurl: "" +version: 2.0.3 + sass: sass_dir: ../ style: compressed diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index c7267ed3..76be15b0 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -72,7 +72,7 @@ diff --git a/docs/docs.scss b/docs/docs.scss index e444d5d9..87aaa77a 100644 --- a/docs/docs.scss +++ b/docs/docs.scss @@ -217,6 +217,10 @@ body { line-height: 1.75; color: #7a7a7a; border-top: 1px solid #eee; + + strong { + color: #333; + } } diff --git a/docs/layout.md b/docs/layout.md index d16a66fc..560fbfc3 100644 --- a/docs/layout.md +++ b/docs/layout.md @@ -26,6 +26,8 @@ The container applies `width: 980px;` and uses horizontal `margin`s to center it ## Grid +### How it works + The grid is pretty standard—you create rows with `.columns` and individual columns with a column class and fraction class. Here's how it works: - Add a `.container` to encapsulate everything and provide ample horizontal gutter space. @@ -33,6 +35,8 @@ The grid is pretty standard—you create rows with `.columns` and individual col - Add your columns with individual `
`s. - Add your fractional width classes to set the width of the columns (e.g., `.one-fourth`). +### Demo + In practice, your columns will look like the example below. {% example html %} @@ -74,3 +78,15 @@ In practice, your columns will look like the example below.
{% endexample %} + +### Centered + +Columns can be [centered](/utilities/#centering-content) by adding `.centered` to the `.column` class. + +{% example html %} +
+
+ .one-half +
+
+{% endexample %} \ No newline at end of file diff --git a/docs/utilities.md b/docs/utilities.md index 75812b2f..301cc8c7 100644 --- a/docs/utilities.md +++ b/docs/utilities.md @@ -47,6 +47,20 @@ Quickly float something to the left or right, and clear them later. {% endexample %} +## Centering content + +Easily center **block level content** if it's not taking up the full width of the parent. Can be used [on grid columns](/layout/#centered) or any other elements. + +{% example html %} + +{% endexample %} + + ## Text alignment Change the `text-align` on elements with a class. diff --git a/scss/_utility.scss b/scss/_utility.scss index eee3df58..5d799691 100644 --- a/scss/_utility.scss +++ b/scss/_utility.scss @@ -9,6 +9,17 @@ .left { float: left; } +// Layout + +// Centers content horizontally. Can be used inside or outside the grid. +.centered { + display: block; + float: none; + margin-left: auto; + margin-right: auto; +} + + // Text alignment .text-right { text-align: right; }