2015-03-21 02:30:22 +03:00
---
layout: page
title: Blankslate
---
2015-03-28 23:28:41 +03:00
Blankslates are for when there is a lack of content within a page or section. Use them as placeholders to tell users why something isn't there. Be sure to provide an action to add content as well.
2015-03-21 02:30:22 +03:00
## Contents
* Will be replaced with the ToC, excluding the "Contents" header
{:toc}
## Basic example
Wrap some content in the outer `.blankslate` wrapper to give it the blankslate appearance.
{% example html %}
< div class = "blankslate" >
< h3 > This is a blank slate< / h3 >
< p > Use it to provide information when no dynamic content exists.< / p >
< / div >
{% endexample %}
## With Octicons
2015-09-26 00:16:29 +03:00
When it helps the message, include (relevant) icons in your blank slate. Add `.blankslate-icon` to any `.mega-octicon` s as the first elements in the blankslate, like so.
2015-03-21 02:30:22 +03:00
{% example html %}
< div class = "blankslate" >
2015-09-26 00:16:29 +03:00
< span class = "mega-octicon octicon-git-commit blankslate-icon" > < / span >
< span class = "mega-octicon octicon-tag blankslate-icon" > < / span >
< span class = "mega-octicon octicon-git-branch blankslate-icon" > < / span >
2015-03-21 02:30:22 +03:00
< h3 > This is a blank slate< / h3 >
< p > Use it to provide information when no dynamic content exists.< / p >
< / div >
{% endexample %}
## Variations
2015-03-28 23:32:16 +03:00
Add an additional optional class to the `.blankslate` to change its appearance.
2015-03-21 02:30:22 +03:00
### Fixed width
Narrows the blankslate container to not occupy the entire available width.
{% example html %}
2015-09-26 00:16:29 +03:00
< div class = "blankslate blankslate-fixed-width" >
2015-03-21 02:30:22 +03:00
< h3 > This is a blank slate< / h3 >
< p > Use it to provide information when no dynamic content exists.< / p >
< / div >
{% endexample %}
### Capped
Removes the `border-radius` on the top corners.
{% example html %}
2015-09-26 00:16:29 +03:00
< div class = "blankslate blankslate-capped" >
2015-03-21 02:30:22 +03:00
< h3 > This is a blank slate< / h3 >
< p > Use it to provide information when no dynamic content exists.< / p >
< / div >
{% endexample %}
### Spacious
Significantly increases the vertical padding.
{% example html %}
2015-09-26 00:16:29 +03:00
< div class = "blankslate blankslate-spacious" >
2015-03-21 02:30:22 +03:00
< h3 > This is a blank slate< / h3 >
< p > Use it to provide information when no dynamic content exists.< / p >
< / div >
{% endexample %}
2016-03-13 04:36:49 +03:00
### Large
Increases the size of the text in the blankslate
{% example html %}
< div class = "blankslate blankslate-large" >
< h3 > This is a blank slate< / h3 >
< p > Use it to provide information when no dynamic content exists.< / p >
< / div >
{% endexample %}
2015-03-21 02:30:22 +03:00
### No background
Removes the `background-color` and `border` .
{% example html %}
2015-09-26 00:16:29 +03:00
< div class = "blankslate blankslate-clean-background" >
2015-03-21 02:30:22 +03:00
< h3 > This is a blank slate< / h3 >
< p > Use it to provide information when no dynamic content exists.< / p >
< / div >
{% endexample %}