move visibility docs and add .visible mention

This commit is contained in:
Mark Otto 2017-03-05 13:03:05 -06:00 committed by Mark Otto
parent b7bf343958
commit 78937cbb39
3 changed files with 33 additions and 24 deletions

View File

@ -59,7 +59,6 @@
- title: Display
- title: Flexbox
- title: Image replacement
- title: Invisible content
- title: Position
- title: Responsive helpers
- title: Screenreaders
@ -67,6 +66,7 @@
- title: Spacing
- title: Typography
- title: Vertical align
- title: Visibility
- title: Extend
pages:

View File

@ -1,23 +0,0 @@
---
layout: docs
title: Invisible content
group: utilities
---
The `.invisible` class can be used to toggle only the visibility of an element, meaning its `display` is not modified and the element can still affect the flow of the document.
{% highlight html %}
<div class="invisible">...</div>
{% endhighlight %}
{% highlight scss %}
// Class
.invisible {
visibility: hidden;
}
// Usage as a mixin
.element {
@include invisible;
}
{% endhighlight %}

View File

@ -0,0 +1,32 @@
---
layout: docs
title: Visibility
group: utilities
---
Set the `visibility` of elements with our visibility utilities. These do not modify the `display` value at all and are helpful for hiding content from most users, but still keeping them for screen readers.
Apply `.visible` or `.invisible` as needed.
{% highlight html %}
<div class="visible">...</div>
<div class="invisible">...</div>
{% endhighlight %}
{% highlight scss %}
// Class
.visible {
visibility: visible;
}
.invisible {
visibility: hidden;
}
// Usage as a mixin
.element {
@include invisible(visible);
}
.element {
@include invisible(hidden);
}
{% endhighlight %}