1
1
mirror of https://github.com/primer/css.git synced 2024-12-28 08:31:58 +03:00
css/docs/blankslate.md

96 lines
2.5 KiB
Markdown
Raw Normal View History

---
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.
## 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.
{% 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>
<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.
### 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">
<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">
<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">
<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 %}
### No background
Removes the `background-color` and `border`.
{% example html %}
2015-09-26 00:16:29 +03:00
<div class="blankslate blankslate-clean-background">
<h3>This is a blank slate</h3>
<p>Use it to provide information when no dynamic content exists.</p>
</div>
{% endexample %}